mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
feat(typography): add letter-spacing configuration to typography configs. (#9932)
This commit is contained in:
committed by
Jeremy Elbourn
parent
9d19291feb
commit
f30609ce48
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user