Skip to content

Commit

Permalink
fix(list): properly align contents in subheader (#6221)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
devversion authored and tinayuangao committed Aug 2, 2017
1 parent 0795432 commit 4e6e42e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib/list/_list-theme.scss
Expand Up @@ -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);
}
}

Expand All @@ -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 change: 1 addition & 0 deletions src/lib/list/list.scss
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 4e6e42e

Please sign in to comment.