Skip to content

Commit

Permalink
fix(list): properly align contents in subheader
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
devversion authored and tinayuangao committed Aug 2, 2017
1 parent 8a23157 commit 8717a38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/list/_list-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
}

.mat-subheader {
@include mat-typography-level-to-styles($config, body-2);
font: mat-font-weight($config, body-2) mat-font-size($config, body-2)
mat-font-family($config, body-2);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/lib/list/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8717a38

Please sign in to comment.