Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/material/core/typography/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@
// and h6 at 0.67em.
.mat-h5, #{$selector} h5 {
@include mat-typography-font-shorthand(
mat-font-size($config, body-1) * 0.83,
// calc is used here to support css variables
calc(#{mat-font-size($config, body-1)} * 0.83),
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment that explains the use of calc here? I could see someone removing it without considering CSS variables.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure

mat-font-weight($config, body-1),
mat-line-height($config, body-1),
mat-font-family($config, body-1)
Expand All @@ -107,7 +108,8 @@

.mat-h6, #{$selector} h6 {
@include mat-typography-font-shorthand(
mat-font-size($config, body-1) * 0.67,
// calc is used here to support css variables
calc(#{mat-font-size($config, body-1)} * 0.67),
mat-font-weight($config, body-1),
mat-line-height($config, body-1),
mat-font-family($config, body-1)
Expand Down