Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(list): properly align contents in subheader #6221

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The font declaration is a little fiddly, especially when omitting values. I'd rather have this split into font-weight, font-size and font-family.

Copy link
Member Author

@devversion devversion Aug 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The font property is used in this file for the dense mode as well (see here).

I'm fine changing it for both if desired.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do that. Also the font-family could be set once on the .mat-list and the subheader can inherit from there instead.

Copy link
Member Author

@devversion devversion Aug 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah makes sense.

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