mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(list): properly align contents in subheader (#6221)
* fix(list): properly align contents in subheader * The line-height of the subheaders is currently based on the typography level. This is problematic because the subheader is set to a specific height and can't grow/shrink accordingly. Fixes #6214 * Address feedback
This commit is contained in:
committed by
tinayuangao
parent
07954325a2
commit
4e6e42ea2f
@@ -46,7 +46,9 @@
|
||||
}
|
||||
|
||||
.mat-subheader {
|
||||
@include mat-typography-level-to-styles($config, body-2);
|
||||
font-family: mat-font-family($config, body-2);
|
||||
font-size: mat-font-size($config, body-2);
|
||||
font-weight: mat-font-weight($config, body-2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +60,9 @@
|
||||
}
|
||||
|
||||
.mat-subheader {
|
||||
font: mat-font-weight($config, body-2) mat-font-size($config, caption) $font-family;
|
||||
font-family: $font-family;
|
||||
font-size: mat-font-size($config, caption);
|
||||
font-weight: mat-font-weight($config, body-2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,6 +121,7 @@ $mat-dense-list-icon-size: 20px;
|
||||
// This mixin adjusts the heights and padding based on whether the list is in dense mode.
|
||||
@mixin mat-subheader-spacing($top-padding, $base-height) {
|
||||
height: $base-height;
|
||||
line-height: $base-height - $mat-list-side-padding * 2;
|
||||
|
||||
&:first-child {
|
||||
margin-top: -$top-padding;
|
||||
|
||||
Reference in New Issue
Block a user