@madgex/design-system 6.3.11 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tokens/css/_tokens.css +25 -90
- package/dist/_tokens/js/_tokens-module.js +465 -2092
- package/dist/assets/icons.json +1 -1
- package/dist/css/index.css +1 -1
- package/package.json +2 -2
- package/src/components/accordion/accordion.config.js +1 -1
- package/src/components/button/button.scss +1 -1
- package/src/components/card/card.scss +1 -1
- package/src/components/inputs/_form-elements.scss +2 -2
- package/src/components/inputs/combobox/combobox.scss +0 -1
- package/src/components/inputs/text-editor/text-editor.scss +1 -1
- package/src/components/pagination/pagination.config.js +3 -3
- package/src/components/skip-link/skip-link.scss +1 -1
- package/src/components/tabs/tabs.scss +2 -2
- package/src/components/toggle-button-links/toggle-button-links.scss +1 -1
- package/src/helpers/edited-text/edited-text.njk +1 -1
- package/src/scss/constants/_sd-tokens.scss +1 -1
- package/src/scss/core/_lists.scss +1 -1
- package/src/scss/core/_typography.scss +5 -5
- package/src/scss/helpers/_edited-text.scss +3 -3
- package/src/scss/helpers/_font-types.scss +17 -31
- package/src/tokens/_config.js +2 -10
- package/src/tokens/typography.json +62 -187
- package/src/typography/block-of-text.config.json +3 -0
- package/src/typography/block-of-text.njk +4 -0
- package/src/typography/font-types.config.json +1 -1
- package/src/typography/font-types.njk +20 -41
- package/tasks/registerTransforms.js +1 -28
|
@@ -33,7 +33,7 @@ module.exports = {
|
|
|
33
33
|
name: 'Next link',
|
|
34
34
|
context: {
|
|
35
35
|
fractalTitle: 'Next link',
|
|
36
|
-
classes: 'mds-font-
|
|
36
|
+
classes: 'mds-font-s-1',
|
|
37
37
|
nextUrl: '/next-page',
|
|
38
38
|
nextExtraLabel: 'Customer Service, Special-Agent Assistant Part-Time',
|
|
39
39
|
backToUrl: '/results/',
|
|
@@ -48,7 +48,7 @@ module.exports = {
|
|
|
48
48
|
name: 'Previous link',
|
|
49
49
|
context: {
|
|
50
50
|
fractalTitle: 'Previous link',
|
|
51
|
-
classes: 'mds-font-
|
|
51
|
+
classes: 'mds-font-s-1',
|
|
52
52
|
prevUrl: '/prev-page',
|
|
53
53
|
prevExtraLabel: 'Part Time Sales Assistant',
|
|
54
54
|
backToUrl: '/results/',
|
|
@@ -63,7 +63,7 @@ module.exports = {
|
|
|
63
63
|
name: 'Translated',
|
|
64
64
|
context: {
|
|
65
65
|
fractalTitle: 'Translated',
|
|
66
|
-
classes: 'mds-font-
|
|
66
|
+
classes: 'mds-font-s-1',
|
|
67
67
|
prevUrl: '/prev-page',
|
|
68
68
|
prevExtraLabel: "Agent / Agente d'entretien de nettoyage industriel",
|
|
69
69
|
nextUrl: '/next-page',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.mds-skip-to-content__link {
|
|
2
2
|
background-color: $constant-color-neutral-lightest;
|
|
3
3
|
border: 5px solid $constant-color-neutral-lighter;
|
|
4
|
-
@extend .mds-font-
|
|
4
|
+
@extend .mds-font-s4;
|
|
5
5
|
font-weight: bold;
|
|
6
6
|
left: -10000px;
|
|
7
7
|
padding: $constant-size-baseline * 6;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.mds-tabs__panel-header {
|
|
18
|
-
@extend .mds-font-
|
|
18
|
+
@extend .mds-font-s2;
|
|
19
19
|
@extend .mds-surface__inner;
|
|
20
20
|
border-bottom: $regular-border;
|
|
21
21
|
padding-top: $constant-size-baseline * 3;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.mds-tabs__list-item {
|
|
28
|
-
@extend .mds-font-
|
|
28
|
+
@extend .mds-font-s2;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.mds-tabs__tab {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
border: $regular-border;
|
|
46
46
|
border-right-width: 0;
|
|
47
47
|
padding: ($constant-size-baseline * 3) ($constant-size-baseline * 5);
|
|
48
|
-
@extend .mds-font-
|
|
48
|
+
@extend .mds-font-s0;
|
|
49
49
|
text-decoration: underline;
|
|
50
50
|
|
|
51
51
|
.mds-toggle-button-links__list-item:first-child & {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
<h4>Paragraph (combined with font-body-copy-bulk):</h4>
|
|
32
|
-
<div class="mds-edited-text mds-font-
|
|
32
|
+
<div class="mds-edited-text mds-font-s0--bulk">
|
|
33
33
|
<h3>Paragraph 1</h3>
|
|
34
34
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse lacus mi, molestie vulputate dolor dictum, mollis tempor dolor. Proin ut interdum tortor, eu dictum massa. Quisque eu congue mi. Curabitur ac fermentum lorem. Ut quam sapien, mollis vel rhoncus et, mattis non sapien. Aenean nec lacinia felis. Aenean rhoncus lacinia pretium. Cras rutrum mollis orci, vitae ultrices nisi fermentum sit amet. Donec vehicula libero ac mollis ornare. Pellentesque eleifend libero urna, accumsan tincidunt lectus lobortis nec.</p>
|
|
35
35
|
<h3>Paragraph 2</h3>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
body {
|
|
2
|
-
@extend .mds-font-
|
|
2
|
+
@extend .mds-font-s0;
|
|
3
3
|
font-family: var(--mds-font-family-base);
|
|
4
4
|
font-weight: var(--mds-font-weight-base);
|
|
5
5
|
color: var(--mds-color-text-base);
|
|
@@ -17,7 +17,7 @@ dl dt {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
h1 {
|
|
20
|
-
@extend .mds-font-
|
|
20
|
+
@extend .mds-font-s6;
|
|
21
21
|
font-family: var(--mds-font-family-heading-1);
|
|
22
22
|
font-weight: var(--mds-font-weight-heading-1);
|
|
23
23
|
color: var(--mds-color-text-headers-1);
|
|
@@ -26,7 +26,7 @@ h1 {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
h2 {
|
|
29
|
-
@extend .mds-font-
|
|
29
|
+
@extend .mds-font-s4;
|
|
30
30
|
font-family: var(--mds-font-family-heading-2);
|
|
31
31
|
font-weight: var(--mds-font-weight-heading-2);
|
|
32
32
|
color: var(--mds-color-text-headers-2);
|
|
@@ -35,7 +35,7 @@ h2 {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
h3 {
|
|
38
|
-
@extend .mds-font-
|
|
38
|
+
@extend .mds-font-s2;
|
|
39
39
|
font-family: var(--mds-font-family-heading-3);
|
|
40
40
|
font-weight: var(--mds-font-weight-heading-3);
|
|
41
41
|
color: var(--mds-color-text-headers-3);
|
|
@@ -44,5 +44,5 @@ h3 {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
h4 {
|
|
47
|
-
@extend .mds-font-
|
|
47
|
+
@extend .mds-font-s0;
|
|
48
48
|
}
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
margin-left: $constant-size-baseline * 4;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
.mds-edited-text.mds-font-
|
|
24
|
-
.mds-font-
|
|
25
|
-
.mds-edited-text .mds-font-
|
|
23
|
+
.mds-edited-text.mds-font-s0--bulk,
|
|
24
|
+
.mds-font-s0--bulk .mds-edited-text,
|
|
25
|
+
.mds-edited-text .mds-font-s0--bulk {
|
|
26
26
|
& p {
|
|
27
27
|
margin-bottom: $constant-size-baseline * 4;
|
|
28
28
|
}
|
|
@@ -1,37 +1,23 @@
|
|
|
1
|
-
$font-types: 'canon', 'trafalgar', 'paragon', 'double-pica', 'great-primer', 'body-copy', 'body-copy-bulk', 'pica',
|
|
2
|
-
'long-primer', 'brevier', 'minion';
|
|
3
1
|
|
|
4
|
-
$
|
|
2
|
+
$font-type-scales: 's-2', 's-1', 's0', 's1', 's2', 's3', 's4', 's5', 's6', 's7', 's8', 's9';
|
|
5
3
|
|
|
6
|
-
// loop will create all the classes for the font
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
// line-height: 1.13;
|
|
15
|
-
// }
|
|
16
|
-
// @media (min-width: $constant-size-breakpoint-md){
|
|
17
|
-
// font-size: 52px;
|
|
18
|
-
// line-height: 1.08;
|
|
19
|
-
// }
|
|
20
|
-
// @media (min-width: $constant-size-breakpoint-lg){
|
|
21
|
-
// font-size: 44px;
|
|
22
|
-
// line-height: 1.1;
|
|
23
|
-
// }
|
|
4
|
+
// loop will create all the classes for the font type scales in the tokens array
|
|
5
|
+
// .mds-font-s0 {
|
|
6
|
+
// font-size: var(--mds-font-type-base-size);
|
|
7
|
+
// line-height: var(--mds-font-type-base-line-height);
|
|
8
|
+
// }
|
|
9
|
+
// .mds-font-s-1 {
|
|
10
|
+
// font-size: var(--mds-font-type-sm-size);
|
|
11
|
+
// line-height: var(--mds-font-type-sm-line-height);
|
|
24
12
|
// }
|
|
25
|
-
@each $typename in $font-types {
|
|
26
|
-
.mds-font-#{$typename} {
|
|
27
|
-
@each $bpname in $breakpoint-names {
|
|
28
|
-
font-size: var(--mds-font-type-#{$typename}-default-size);
|
|
29
|
-
line-height: var(--mds-font-type-#{$typename}-default-line-height);
|
|
30
13
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
14
|
+
@each $scale in $font-type-scales {
|
|
15
|
+
.mds-font-#{$scale} {
|
|
16
|
+
font-size: var(--mds-font-type-#{$scale}-size);
|
|
17
|
+
line-height: var(--mds-font-type-#{$scale}-line-height);
|
|
36
18
|
}
|
|
37
19
|
}
|
|
20
|
+
|
|
21
|
+
.mds-font-s0--bulk {
|
|
22
|
+
line-height: 1.75;
|
|
23
|
+
}
|
package/src/tokens/_config.js
CHANGED
|
@@ -6,15 +6,7 @@ const config = {
|
|
|
6
6
|
platforms: {
|
|
7
7
|
'css-variables': {
|
|
8
8
|
// transformGroup: 'css',
|
|
9
|
-
transforms: [
|
|
10
|
-
'attribute/cti',
|
|
11
|
-
'name/cti/kebab',
|
|
12
|
-
'time/seconds',
|
|
13
|
-
'content/icon',
|
|
14
|
-
'color/css',
|
|
15
|
-
'css/rawData',
|
|
16
|
-
'custom/pxToRem',
|
|
17
|
-
],
|
|
9
|
+
transforms: ['attribute/cti', 'name/cti/kebab', 'time/seconds', 'content/icon', 'color/css', 'css/rawData'],
|
|
18
10
|
buildPath: `${path.resolve(__dirname, '../../dist/_tokens/css/')}/`,
|
|
19
11
|
prefix: 'mds',
|
|
20
12
|
files: [
|
|
@@ -81,7 +73,7 @@ const config = {
|
|
|
81
73
|
// ],
|
|
82
74
|
// },
|
|
83
75
|
'js-module': {
|
|
84
|
-
transforms: ['attribute/cti', 'name/cti/pascal'
|
|
76
|
+
transforms: ['attribute/cti', 'name/cti/pascal'],
|
|
85
77
|
buildPath: `${path.resolve(__dirname, '../../dist/_tokens/js/')}/`,
|
|
86
78
|
prefix: 'mds',
|
|
87
79
|
files: [
|
|
@@ -75,226 +75,101 @@
|
|
|
75
75
|
"value": "{font.spacing.base.value}"
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
"size": {
|
|
79
|
-
"base": {
|
|
80
|
-
"value": "16px"
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
78
|
"type": {
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"value": "28px"
|
|
88
|
-
},
|
|
89
|
-
"line-height": { "value": "1.15" }
|
|
90
|
-
},
|
|
91
|
-
"sm": {
|
|
92
|
-
"size": { "value": "32px" },
|
|
93
|
-
"line-height": { "value": "1.13" }
|
|
79
|
+
"s-2": {
|
|
80
|
+
"size": {
|
|
81
|
+
"value": "0.75rem"
|
|
94
82
|
},
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"line-height": { "value": "1.08" }
|
|
98
|
-
},
|
|
99
|
-
"lg": {
|
|
100
|
-
"size": { "value": "44px" },
|
|
101
|
-
"line-height": { "value": "1.1" }
|
|
83
|
+
"line-height": {
|
|
84
|
+
"value": "1.35"
|
|
102
85
|
}
|
|
103
86
|
},
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"line-height": { "value": "1.2" }
|
|
108
|
-
},
|
|
109
|
-
"sm": {
|
|
110
|
-
"size": { "value": "24px" },
|
|
111
|
-
"line-height": { "value": "1.17" }
|
|
112
|
-
},
|
|
113
|
-
"md": {
|
|
114
|
-
"size": { "value": "36px" },
|
|
115
|
-
"line-height": { "value": "1.12" }
|
|
87
|
+
"s-1": {
|
|
88
|
+
"size": {
|
|
89
|
+
"value": "0.875rem"
|
|
116
90
|
},
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"line-height": { "value": "1.13" }
|
|
91
|
+
"line-height": {
|
|
92
|
+
"value": "1.35"
|
|
120
93
|
}
|
|
121
94
|
},
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"line-height": { "value": "1.2" }
|
|
95
|
+
"s0": {
|
|
96
|
+
"size": {
|
|
97
|
+
"value": "1rem"
|
|
126
98
|
},
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"line-height": { "value": "1.19" }
|
|
130
|
-
},
|
|
131
|
-
"md": {
|
|
132
|
-
"size": { "value": "28px" },
|
|
133
|
-
"line-height": { "value": "1.15" }
|
|
134
|
-
},
|
|
135
|
-
"lg": {
|
|
136
|
-
"size": { "value": "28px" },
|
|
137
|
-
"line-height": { "value": "1.15" }
|
|
99
|
+
"line-height": {
|
|
100
|
+
"value": "1.4"
|
|
138
101
|
}
|
|
139
102
|
},
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"line-height": { "value": "1.2" }
|
|
144
|
-
},
|
|
145
|
-
"sm": {
|
|
146
|
-
"size": { "value": "20px" },
|
|
147
|
-
"line-height": { "value": "1.2" }
|
|
103
|
+
"s1": {
|
|
104
|
+
"size": {
|
|
105
|
+
"value": "clamp(1.067rem, 1.0468rem + 0.1009vi, 1.125rem)"
|
|
148
106
|
},
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"line-height": { "value": "1.16" }
|
|
152
|
-
},
|
|
153
|
-
"lg": {
|
|
154
|
-
"size": { "value": "24px" },
|
|
155
|
-
"line-height": { "value": "1.17" }
|
|
107
|
+
"line-height": {
|
|
108
|
+
"value": "1.4"
|
|
156
109
|
}
|
|
157
110
|
},
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"line-height": { "value": "1.23" }
|
|
162
|
-
},
|
|
163
|
-
"sm": {
|
|
164
|
-
"size": { "value": "18px" },
|
|
165
|
-
"line-height": { "value": "1.23" }
|
|
166
|
-
},
|
|
167
|
-
"md": {
|
|
168
|
-
"size": { "value": "21px" },
|
|
169
|
-
"line-height": { "value": "1.15" }
|
|
111
|
+
"s2": {
|
|
112
|
+
"size": {
|
|
113
|
+
"value": "clamp(1.1385rem, 1.0943rem + 0.2211vi, 1.2656rem)"
|
|
170
114
|
},
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"line-height": { "value": "1.2" }
|
|
115
|
+
"line-height": {
|
|
116
|
+
"value": "1.2"
|
|
174
117
|
}
|
|
175
118
|
},
|
|
176
|
-
"
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
"line-height": { "value": "1.38" }
|
|
119
|
+
"s3": {
|
|
120
|
+
"size": {
|
|
121
|
+
"value": "clamp(1.2148rem, 1.1421rem + 0.3636vi, 1.4238rem)"
|
|
180
122
|
},
|
|
181
|
-
"
|
|
182
|
-
"
|
|
183
|
-
"line-height": { "value": "1.38" }
|
|
184
|
-
},
|
|
185
|
-
"md": {
|
|
186
|
-
"size": { "value": "18px" },
|
|
187
|
-
"line-height": { "value": "1.34" }
|
|
188
|
-
},
|
|
189
|
-
"lg": {
|
|
190
|
-
"size": { "value": "16px" },
|
|
191
|
-
"line-height": { "value": "1.38" }
|
|
123
|
+
"line-height": {
|
|
124
|
+
"value": "1.2"
|
|
192
125
|
}
|
|
193
126
|
},
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
"value": "16px"
|
|
198
|
-
},
|
|
199
|
-
"line-height": {
|
|
200
|
-
"value": "1.75"
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
"sm": {
|
|
204
|
-
"size": {
|
|
205
|
-
"value": "16px"
|
|
206
|
-
},
|
|
207
|
-
"line-height": {
|
|
208
|
-
"value": "1.75"
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
"md": {
|
|
212
|
-
"size": {
|
|
213
|
-
"value": "18px"
|
|
214
|
-
},
|
|
215
|
-
"line-height": {
|
|
216
|
-
"value": "1.67"
|
|
217
|
-
}
|
|
127
|
+
"s4": {
|
|
128
|
+
"size": {
|
|
129
|
+
"value": "clamp(1.2962rem, 1.1898rem + 0.5316vi, 1.6018rem)"
|
|
218
130
|
},
|
|
219
|
-
"
|
|
220
|
-
"
|
|
221
|
-
"value": "16px"
|
|
222
|
-
},
|
|
223
|
-
"line-height": {
|
|
224
|
-
"value": "1.75"
|
|
225
|
-
}
|
|
131
|
+
"line-height": {
|
|
132
|
+
"value": "1.2"
|
|
226
133
|
}
|
|
227
134
|
},
|
|
228
|
-
"
|
|
229
|
-
"
|
|
230
|
-
"
|
|
231
|
-
"line-height": { "value": "1.34" }
|
|
135
|
+
"s5": {
|
|
136
|
+
"size": {
|
|
137
|
+
"value": "clamp(1.383rem, 1.2372rem + 0.7288vi, 1.802rem)"
|
|
232
138
|
},
|
|
233
|
-
"
|
|
234
|
-
"
|
|
235
|
-
"line-height": { "value": "1.25" }
|
|
236
|
-
},
|
|
237
|
-
"md": {
|
|
238
|
-
"size": { "value": "18px" },
|
|
239
|
-
"line-height": { "value": "1.23" }
|
|
240
|
-
},
|
|
241
|
-
"lg": {
|
|
242
|
-
"size": { "value": "16px" },
|
|
243
|
-
"line-height": { "value": "1.25" }
|
|
139
|
+
"line-height": {
|
|
140
|
+
"value": "1.2"
|
|
244
141
|
}
|
|
245
142
|
},
|
|
246
|
-
"
|
|
247
|
-
"
|
|
248
|
-
"
|
|
249
|
-
"line-height": { "value": "1.2" }
|
|
250
|
-
},
|
|
251
|
-
"sm": {
|
|
252
|
-
"size": { "value": "15px" },
|
|
253
|
-
"line-height": { "value": "1.2" }
|
|
143
|
+
"s6": {
|
|
144
|
+
"size": {
|
|
145
|
+
"value": "clamp(1.4757rem, 1.2838rem + 0.9593vi, 2.0273rem)"
|
|
254
146
|
},
|
|
255
|
-
"
|
|
256
|
-
"
|
|
257
|
-
"line-height": { "value": "1.34" }
|
|
258
|
-
},
|
|
259
|
-
"lg": {
|
|
260
|
-
"size": { "value": "14px" },
|
|
261
|
-
"line-height": { "value": "1.29" }
|
|
147
|
+
"line-height": {
|
|
148
|
+
"value": "1.15"
|
|
262
149
|
}
|
|
263
150
|
},
|
|
264
|
-
"
|
|
265
|
-
"
|
|
266
|
-
"
|
|
267
|
-
"line-height": { "value": "1.15" }
|
|
268
|
-
},
|
|
269
|
-
"sm": {
|
|
270
|
-
"size": { "value": "14px" },
|
|
271
|
-
"line-height": { "value": "1.29" }
|
|
272
|
-
},
|
|
273
|
-
"md": {
|
|
274
|
-
"size": { "value": "14px" },
|
|
275
|
-
"line-height": { "value": "1.29" }
|
|
151
|
+
"s7": {
|
|
152
|
+
"size": {
|
|
153
|
+
"value": "clamp(1.5745rem, 1.3289rem + 1.2281vi, 2.2807rem)"
|
|
276
154
|
},
|
|
277
|
-
"
|
|
278
|
-
"
|
|
279
|
-
"line-height": { "value": "1.24" }
|
|
155
|
+
"line-height": {
|
|
156
|
+
"value": "1.15"
|
|
280
157
|
}
|
|
281
158
|
},
|
|
282
|
-
"
|
|
283
|
-
"
|
|
284
|
-
"
|
|
285
|
-
"line-height": { "value": "1.34" }
|
|
159
|
+
"s8": {
|
|
160
|
+
"size": {
|
|
161
|
+
"value": "clamp(1.68rem, 1.3719rem + 1.5405vi, 2.5658rem)"
|
|
286
162
|
},
|
|
287
|
-
"
|
|
288
|
-
"
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
"
|
|
163
|
+
"line-height": {
|
|
164
|
+
"value": "1.15"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"s9": {
|
|
168
|
+
"size": {
|
|
169
|
+
"value": "clamp(1.7926rem, 1.4121rem + 1.9025vi, 2.8865rem)"
|
|
294
170
|
},
|
|
295
|
-
"
|
|
296
|
-
"
|
|
297
|
-
"line-height": { "value": "1.34" }
|
|
171
|
+
"line-height": {
|
|
172
|
+
"value": "1.15"
|
|
298
173
|
}
|
|
299
174
|
}
|
|
300
175
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<div class="mds-font-s0--bulk">
|
|
2
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras ante ante, volutpat non venenatis ut, blandit vel tellus. Suspendisse sagittis convallis tincidunt. Proin ut neque quis enim maximus congue. Integer ullamcorper a urna gravida efficitur. Aliquam elementum non sem eu mattis. Proin erat nulla, tincidunt quis volutpat vel, suscipit sit amet sapien. Integer auctor aliquet ligula, vel mollis lorem semper id.</p>
|
|
3
|
+
<p>Praesent pharetra, ligula sed laoreet scelerisque, libero elit commodo sem, et varius arcu risus non turpis. Nulla scelerisque urna non felis vulputate luctus. Nullam ut metus at elit consequat ultrices. Nulla bibendum feugiat nibh, ut pellentesque orci pellentesque et. Nunc sagittis lacus quis elementum ornare. Nulla non commodo diam. Proin est ante, vestibulum et nisi nec, viverra pretium magna. Suspendisse sit amet mauris velit. Fusce placerat, lectus ut facilisis mattis, neque sapien hendrerit ex, ut dapibus dui sapien id orci. Nulla accumsan lacus commodo, euismod eros ac, malesuada eros. Phasellus ultricies porta eros a dictum. Integer dapibus ultrices elit, ut lacinia diam volutpat ac. Curabitur eu sollicitudin lectus. Donec fringilla lacus turpis, eu posuere orci lobortis vel. Morbi non diam id sapien commodo interdum id viverra tortor. Suspendisse iaculis odio justo, at maximus tellus facilisis ut.</p>
|
|
4
|
+
</div>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"notes": "
|
|
2
|
+
"notes": "We're using Utopia fluid type scale: https://utopia.fyi/type/calculator?c=320,16,1.067,1240,16,1.125,9,3,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12\n\nWe customised font `s-2` and `s-1` so they have a fixed value and don't change depending on the size of the viewport.\nThose 2 fonts being already quite small, we didn't want them getting smaller for accessibility or bigger as they would get too close to the base size and we would lose the visual hierarchy of the text."
|
|
3
3
|
}
|
|
@@ -1,53 +1,32 @@
|
|
|
1
|
-
{#
|
|
2
|
-
{% set
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
{# Comments from https://utopia.fyi/type/calculator?c=320,16,1.067,1240,16,1.125,9,3,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 #}
|
|
2
|
+
{% set fontSizesDoc = {
|
|
3
|
+
's-2': '12px',
|
|
4
|
+
's-1': '14px',
|
|
5
|
+
's0': '16px',
|
|
6
|
+
's1': '17.072px → 18px',
|
|
7
|
+
's2': '18.2158px → 20.25px',
|
|
8
|
+
's3': '19.4363px → 22.7813px',
|
|
9
|
+
's4': '20.7385px → 25.6289px',
|
|
10
|
+
's5': '22.128px → 28.8325px',
|
|
11
|
+
's6': '23.6106px → 32.4366px',
|
|
12
|
+
's7': '25.1925px → 36.4912px',
|
|
13
|
+
's8': '26.8804px → 41.0526px',
|
|
14
|
+
's9': '28.6814px → 46.1841px'
|
|
15
|
+
} %}
|
|
6
16
|
|
|
7
17
|
<style>
|
|
8
18
|
.breakpoint-indicator { display: flex; width: 100%; position: sticky; top: 0; background: white; }
|
|
9
19
|
.example-copy { background-color: #f8f8f8; }
|
|
10
20
|
.example-copy:hover { background-color: #ececec; }
|
|
11
|
-
|
|
12
|
-
{% for bpname in bps %}
|
|
13
|
-
{%- set nextbpname = bps[loop.index0 + 1] -%}
|
|
14
|
-
|
|
15
|
-
{%- set lower = tokens.size.breakpoint[bpname] -%}
|
|
16
|
-
{%- if lower -%}
|
|
17
|
-
{%- set lower = (tokens.size.breakpoint[bpname].original.value).split('px')[0] -%}
|
|
18
|
-
{%- endif -%}
|
|
19
|
-
|
|
20
|
-
{%- set upper = tokens.size.breakpoint[nextbpname] -%}
|
|
21
|
-
{%- if upper -%}
|
|
22
|
-
{%- set upper = (tokens.size.breakpoint[nextbpname].original.value).split('px')[0]-1 -%}
|
|
23
|
-
{%- endif %}
|
|
24
|
-
|
|
25
|
-
@media {% if lower -%}(min-width: {{ lower }}px){%- endif -%}{% if lower and upper %} and {% endif %}{% if upper -%}(max-width: {{ upper }}px){%- endif -%} {
|
|
26
|
-
.rwd-{{ bpname }} { background: #fffdac; }
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
{% endfor -%}
|
|
30
21
|
</style>
|
|
31
22
|
|
|
32
23
|
{% for fontName, item in tokens.font.type %}
|
|
33
24
|
<div class="mds-margin-bottom-b10">
|
|
34
|
-
<h2 class="mds-margin-bottom-b5"><strong>{{ fontName
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class="mds-padding-b2 rwd-{{ bpname }}" style="flex: 1; border: 1px solid #eee;">
|
|
40
|
-
<strong>{{ bpname }}</strong>
|
|
41
|
-
{% set selectedFont = tokens.font.type[fontName][bpname] %}
|
|
42
|
-
<ul class="mds-margin-b0">
|
|
43
|
-
{% for cssProperty, subSubItem in selectedFont %}
|
|
44
|
-
<li>{{ cssProperty }}: {{subSubItem.value}}</li>
|
|
45
|
-
{% endfor %}
|
|
46
|
-
</ul>
|
|
47
|
-
</div>
|
|
48
|
-
{% endfor %}
|
|
49
|
-
</div>
|
|
50
|
-
|
|
25
|
+
<h2 class="mds-margin-bottom-b5"><strong>{{ fontName }}</strong></h2>
|
|
26
|
+
<ul>
|
|
27
|
+
<li>Size (in px): <strong>{{ fontSizesDoc[fontName] }}</strong> <span class="mds-font-s-1">(Viewport width: min 320px → max 1240px)</span></li>
|
|
28
|
+
<li>Line height: <strong>{{ item['line-height'].value }}</strong></li>
|
|
29
|
+
</ul>
|
|
51
30
|
<p class="mds-margin-bottom-b1" style="font-size: 16px;">Example:</p>
|
|
52
31
|
<div class="example-copy mds-highlighted-container" style="margin-bottom: 80px;">
|
|
53
32
|
<div class="mds-font-{{ fontName }}">
|