From 06db8c34bb01d53f3257a96902d32bdcf0d0c005 Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Fri, 19 Feb 2021 09:25:43 -0700 Subject: [PATCH] Revert "fix(material-experimental/mdc-typography): strip typography properties (#21878)" This reverts commit 07eb0f7ff5db03d6290f38eebed391d61a3ce55f. --- .../mdc-helpers/_mdc-helpers.scss | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/material-experimental/mdc-helpers/_mdc-helpers.scss b/src/material-experimental/mdc-helpers/_mdc-helpers.scss index 10a107b0654e..7d2cfa75be61 100644 --- a/src/material-experimental/mdc-helpers/_mdc-helpers.scss +++ b/src/material-experimental/mdc-helpers/_mdc-helpers.scss @@ -96,11 +96,12 @@ $mat-typography-2018-level-mappings: ( $mat-typography-2018-level-mappings, $mat-typography-2014-level-mappings); $mdc-level: map-get(map-get($mappings, mat-to-mdc), $mat-level); - $result-with-nulls: map-merge( + @return map-merge( if($mdc-level, map-get($mdc-typography-styles, $mdc-level), ( text-decoration: none, + text-transform: none, -moz-osx-font-smoothing: grayscale, -webkit-font-smoothing: antialiased )), @@ -112,19 +113,9 @@ $mat-typography-2018-level-mappings: ( letter-spacing: mat-letter-spacing($mat-config, $mat-level), font-family: mat-font-family($mat-config, $mat-level), // Angular Material doesn't use text-transform, so disable it. - text-transform: null, + text-transform: none, ), ())); - - // We need to strip out any keys with a null value. Leaving them in will cause MDC to emit CSS - // variables with no fallback value, which breaks some builds. - $result: (); - @each $property, $value in $result-with-nulls { - @if $value != null { - $result: map-merge($result, ($property: $value)); - } - } - @return $result; } // Converts an Angular Material typography config to an MDC one.