|
3 | 3 | @use 'sass:meta';
|
4 | 4 |
|
5 | 5 | @function md-sys-typescale-values($config) {
|
| 6 | + // Mapping is according to the old 2014 version of the typography spec. |
6 | 7 | $sys-to-config: (
|
7 |
| - body-large: body-1, |
8 |
| - body-medium: body-2, |
| 8 | + body-large: subheading-1, |
| 9 | + body-medium: body-1, |
9 | 10 | body-small: caption,
|
10 |
| - label-large: subtitle-1, |
11 |
| - label-medium: subtitle-2, |
| 11 | + display-large: display-4, |
| 12 | + display-medium: display-4, |
| 13 | + display-small: display-4, |
| 14 | + headline-large: display-3, |
| 15 | + headline-medium: display-2, |
| 16 | + headline-small: display-1, |
| 17 | + label-large: subheading-2, |
| 18 | + label-medium: body-2, |
12 | 19 | label-small: button,
|
13 |
| - display-large: headline-1, |
14 |
| - display-medium: headline-1, |
15 |
| - display-small: headline-1, |
16 |
| - headline-large: headline-2, |
17 |
| - headline-medium: headline-3, |
18 |
| - headline-small: headline-4, |
19 |
| - title-large: headline-5, |
20 |
| - title-medium: headline-5, |
21 |
| - title-small: headline-6, |
| 20 | + title-large: headline, |
| 21 | + title-medium: headline, |
| 22 | + title-small: title, |
22 | 23 | );
|
23 | 24 |
|
24 |
| - // If the config is based on an old 2014 version of the typography spec, then |
25 |
| - // use the old config keys to map to the new system tokens. |
26 |
| - @if (map.get($config, headline) != null) { |
| 25 | + // If the config is based on the updated 2018 version of the typography spec, then |
| 26 | + // use the correct config keys mapping. |
| 27 | + @if (map.get($config, headline-1) != null) { |
27 | 28 | $sys-to-config: (
|
28 |
| - body-large: subheading-1, |
29 |
| - body-medium: body-1, |
| 29 | + body-large: body-1, |
| 30 | + body-medium: body-2, |
30 | 31 | body-small: caption,
|
31 |
| - display-large: display-4, |
32 |
| - display-medium: display-4, |
33 |
| - display-small: display-4, |
34 |
| - headline-large: display-3, |
35 |
| - headline-medium: display-2, |
36 |
| - headline-small: display-1, |
37 |
| - label-large: subheading-2, |
38 |
| - label-medium: body-2, |
| 32 | + label-large: subtitle-1, |
| 33 | + label-medium: subtitle-2, |
39 | 34 | label-small: button,
|
40 |
| - title-large: headline, |
41 |
| - title-medium: headline, |
42 |
| - title-small: title, |
| 35 | + display-large: headline-1, |
| 36 | + display-medium: headline-1, |
| 37 | + display-small: headline-1, |
| 38 | + headline-large: headline-2, |
| 39 | + headline-medium: headline-3, |
| 40 | + headline-small: headline-4, |
| 41 | + title-large: headline-5, |
| 42 | + title-medium: headline-5, |
| 43 | + title-small: headline-6, |
43 | 44 | );
|
44 | 45 | }
|
45 | 46 |
|
|
0 commit comments