Skip to content

Commit 1975f72

Browse files
committed
fix(material-experimental/mdc-typography): strip typography properties
with null value
1 parent aa7dc00 commit 1975f72

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/material-experimental/mdc-helpers/_mdc-helpers.scss

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,11 @@ $mat-typography-2018-level-mappings: (
9696
$mat-typography-2018-level-mappings, $mat-typography-2014-level-mappings);
9797
$mdc-level: map-get(map-get($mappings, mat-to-mdc), $mat-level);
9898

99-
@return map-merge(
99+
$result-with-nulls: map-merge(
100100
if($mdc-level,
101101
map-get($mdc-typography-styles, $mdc-level),
102102
(
103103
text-decoration: none,
104-
text-transform: none,
105104
-moz-osx-font-smoothing: grayscale,
106105
-webkit-font-smoothing: antialiased
107106
)),
@@ -113,9 +112,17 @@ $mat-typography-2018-level-mappings: (
113112
letter-spacing: mat-letter-spacing($mat-config, $mat-level),
114113
font-family: mat-font-family($mat-config, $mat-level),
115114
// Angular Material doesn't use text-transform, so disable it.
116-
text-transform: none,
115+
text-transform: null,
117116
),
118117
()));
118+
119+
$result: ();
120+
@each $property, $value in $result-with-nulls {
121+
@if $value != null {
122+
$result: map-merge($result, ($property: $value));
123+
}
124+
}
125+
@return $result;
119126
}
120127

121128
// Converts an Angular Material typography config to an MDC one.

0 commit comments

Comments
 (0)