feat(typography): add letter-spacing configuration to typography configs. (#9932)

This commit is contained in:
Joey Perrott
2018-02-17 17:12:19 -08:00
committed by Jeremy Elbourn
parent 9d19291feb
commit f30609ce48
2 changed files with 10 additions and 2 deletions
@@ -18,6 +18,11 @@
@return _mat-get-type-value($config, $level, font-weight);
}
// Gets the letter spacing for a level inside a typography config.
@function mat-letter-spacing($config, $level) {
@return _mat-get-type-value($config, $level, letter-spacing);
}
// Gets the font-family from a typography config and removes the quotes around it.
@function mat-font-family($config, $level: null) {
$font-family: map-get($config, font-family);
@@ -64,4 +69,5 @@
$font-family: mat-font-family($config, $level);
@include mat-typography-font-shorthand($font-size, $font-weight, $line-height, $font-family);
letter-spacing: mat-letter-spacing($config, $level);
}
+4 -2
View File
@@ -5,13 +5,15 @@
$font-size,
$line-height: $font-size,
$font-weight: 400,
$font-family: null) {
$font-family: null,
$letter-spacing: null) {
@return (
font-size: $font-size,
line-height: $line-height,
font-weight: $font-weight,
font-family: $font-family
font-family: $font-family,
letter-spacing: $letter-spacing
);
}