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:
Paul Gschwendtner
2017-08-03 01:14:57 +02:00
committed by tinayuangao
parent 07954325a2
commit 4e6e42ea2f
2 changed files with 7 additions and 2 deletions
+6 -2
View File
@@ -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);
}
}
}
+1
View File
@@ -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;