File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 3636 $line-height : mat-line-height ($config , $level );
3737 $font-family : mat-font-family ($config , $level );
3838
39- // Use the shorthand `font` to represent a typography level, because it's the shortest. Notes that
40- // we need to use interpolation for `font-size/line-height` in order to prevent SASS from dividing
41- // the two values.
42- font : $font-weight #{$font-size } / #{$line-height } $font-family ;
39+ // If any of the values are set to `inherit`, we can't use the shorthand
40+ // so we fall back to passing in the individual properties.
41+ @if ($font-size == inherit or
42+ $font-weight == inherit or
43+ $line-height == inherit or
44+ $font-family == inherit ) {
45+
46+ font-size : $font-size ;
47+ font-weight : $font-weight ;
48+ line-height : $line-height ;
49+ font-family : $font-family ;
50+ }
51+ @else {
52+ // Otherwise use the shorthand `font` to represent a typography level, because it's the the
53+ // least amount of bytes. Note that we need to use interpolation for `font-size/line-height`
54+ // in order to prevent SASS from dividing the two values.
55+ font : $font-weight #{$font-size } / #{$line-height } $font-family ;
56+ }
4357}
You can’t perform that action at this time.
0 commit comments