|
91 | 91 | @return null
|
92 | 92 | }
|
93 | 93 | @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), |
107 | 107 | );
|
| 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...); |
108 | 115 | }
|
109 | 116 | @return $config;
|
110 | 117 | }
|
|
0 commit comments