Skip to content

Commit c4ff327

Browse files
committed
fixup! refactor(material/theming): clean up theme file and use mdc typography everywhere
1 parent f81f64e commit c4ff327

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

src/material/core/typography/_typography.scss

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,27 @@
9191
@return null
9292
}
9393
@if not mat-private-typography-is-2014-config($config) {
94-
@return mat-typography-config(
95-
$display-4: map-get($config, headline-1),
96-
$display-3: map-get($config, headline-2),
97-
$display-2: map-get($config, headline-3),
98-
$display-1: map-get($config, headline-4),
99-
$headline: map-get($config, headline-5),
100-
$title: map-get($config, headline-6),
101-
$subheading-2: map-get($config, subtitle-1),
102-
$subheading-1: map-get($config, subtitle-2),
103-
$body-2: map-get($config, body-1),
104-
$body-1: map-get($config, body-2),
105-
$button: map-get($config, button),
106-
$caption: map-get($config, caption),
94+
$args: (
95+
display-4: map-get($config, headline-1),
96+
display-3: map-get($config, headline-2),
97+
display-2: map-get($config, headline-3),
98+
display-1: map-get($config, headline-4),
99+
headline: map-get($config, headline-5),
100+
title: map-get($config, headline-6),
101+
subheading-2: map-get($config, subtitle-1),
102+
subheading-1: map-get($config, subtitle-2),
103+
body-2: map-get($config, body-1),
104+
body-1: map-get($config, body-2),
105+
button: map-get($config, button),
106+
caption: map-get($config, caption),
107107
);
108+
$non-null-args: ();
109+
@each $key, $value in $args {
110+
@if $value != null {
111+
$non-null-args: map-merge($non-null-args, ($key: $value));
112+
}
113+
}
114+
@return mat-typography-config($non-null-args...);
108115
}
109116
@return $config;
110117
}

0 commit comments

Comments
 (0)