@carbon/type 10.44.0-rc.0 → 11.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/README.md +2 -6
- package/index.scss +7 -7
- package/package.json +6 -6
- package/scss/_classes.scss +8 -7
- package/scss/{modules/_default-type.scss → _default-type.scss} +2 -8
- package/scss/_font-family.scss +51 -17
- package/scss/_inlined/_classes.scss +8 -7
- package/scss/_inlined/_default-type.scss +49 -0
- package/scss/_inlined/_font-family.scss +51 -17
- package/scss/_inlined/_reset.scss +11 -59
- package/scss/_inlined/_scale.scss +13 -15
- package/scss/_inlined/_styles.scss +146 -214
- package/scss/_reset.scss +11 -59
- package/scss/_scale.scss +13 -15
- package/scss/_styles.scss +146 -214
- package/scss/vendor/@carbon/grid/{modules/_breakpoint.scss → _breakpoint.scss} +1 -1
- package/scss/vendor/@carbon/grid/{modules/_config.scss → _config.scss} +1 -1
- package/scss/vendor/@carbon/grid/{modules/_css-grid.scss → _css-grid.scss} +0 -0
- package/scss/vendor/@carbon/grid/{modules/_flex-grid.scss → _flex-grid.scss} +0 -20
- package/scss/vendor/@carbon/grid/_inlined/_breakpoint.scss +198 -0
- package/scss/vendor/@carbon/grid/_inlined/_config.scss +94 -0
- package/scss/vendor/@carbon/grid/_inlined/_css-grid.scss +470 -0
- package/scss/vendor/@carbon/grid/{modules/_mixins.scss → _inlined/_flex-grid.scss} +45 -38
- package/scss/vendor/@carbon/grid/_inlined/_mixins.scss +89 -188
- package/scss/vendor/@carbon/grid/_mixins.scss +89 -188
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_convert.import.scss +2 -4
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_convert.scss +18 -23
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_spacing.scss +2 -5
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_utilities.scss +4 -4
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_container.scss +13 -43
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_fluid-spacing.scss +11 -35
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_icon-size.scss +8 -17
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_size.scss +1 -1
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_spacing.scss +29 -107
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/modules/_convert.scss +2 -4
- package/scss/_inlined/_styles.import.scss +0 -766
- package/scss/_inlined/font-face/_mono.scss +0 -1166
- package/scss/_inlined/font-face/_sans-condensed.scss +0 -1009
- package/scss/_inlined/font-face/_sans.scss +0 -1326
- package/scss/_inlined/font-face/_serif.scss +0 -1166
- package/scss/_inlined/font-face/_settings.scss +0 -12
- package/scss/_styles.import.scss +0 -766
- package/scss/font-face/_mono.scss +0 -1166
- package/scss/font-face/_sans-condensed.scss +0 -1009
- package/scss/font-face/_sans.scss +0 -1326
- package/scss/font-face/_serif.scss +0 -1166
- package/scss/font-face/_settings.scss +0 -12
- package/scss/index.scss +0 -8
- package/scss/modules/_classes.scss +0 -42
- package/scss/modules/_font-family.scss +0 -104
- package/scss/modules/_prefix.scss +0 -11
- package/scss/modules/_reset.scss +0 -44
- package/scss/modules/_scale.scss +0 -57
- package/scss/modules/_styles.scss +0 -876
- package/scss/type.scss +0 -8
- package/scss/vendor/@carbon/grid/12.scss +0 -41
- package/scss/vendor/@carbon/grid/_inlined/12.scss +0 -41
- package/scss/vendor/@carbon/grid/_inlined/_mixins.import.scss +0 -431
- package/scss/vendor/@carbon/grid/_inlined/_prefix.scss +0 -12
- package/scss/vendor/@carbon/grid/_mixins.import.scss +0 -431
- package/scss/vendor/@carbon/grid/_prefix.scss +0 -12
- package/scss/vendor/@carbon/grid/grid.scss +0 -10
- package/scss/vendor/@carbon/grid/index.scss +0 -10
- package/scss/vendor/@carbon/grid/vendor/@carbon/import-once/import-once.scss +0 -27
- package/scss/vendor/@carbon/grid/vendor/@carbon/import-once/index.scss +0 -8
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_breakpoint.scss +0 -246
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_key-height.import.scss +0 -117
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_key-height.scss +0 -111
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_mini-unit.scss +0 -23
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_layout.scss +0 -97
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/index.scss +0 -8
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/layout.scss +0 -12
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/modules/_spacing.scss +0 -9
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/modules/_utilities.scss +0 -41
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/modules/generated/_fluid-spacing.scss +0 -37
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/modules/generated/_spacing.scss +0 -91
- package/scss/vendor/@carbon/import-once/import-once.scss +0 -27
- package/scss/vendor/@carbon/import-once/index.scss +0 -8
|
@@ -4,75 +4,32 @@
|
|
|
4
4
|
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
6
6
|
//
|
|
7
|
-
//-------------------------------------------
|
|
8
|
-
// Compatibility notes
|
|
9
|
-
// ------------------------------------------
|
|
10
|
-
//
|
|
11
|
-
// This file is intended to be consumed and processed with node-sass/libsass.
|
|
12
|
-
// Sass language features only available in dart-sass, such as `math.div`,
|
|
13
|
-
// should not be used.
|
|
14
|
-
//
|
|
15
|
-
// The `.import` suffixed version of this file eg. `_filename.import.scss`
|
|
16
|
-
// is intended to be compatible with dart-sass.
|
|
17
|
-
//
|
|
18
|
-
// Styles authored within this file must be duplicated to the corresponding
|
|
19
|
-
// compatibility file to ensure we continue to support node-sass and dart-sass
|
|
20
|
-
// in v10.
|
|
21
7
|
|
|
22
8
|
// stylelint-disable number-max-precision
|
|
23
9
|
|
|
24
|
-
@
|
|
25
|
-
@
|
|
26
|
-
@
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/// @deprecated
|
|
31
|
-
/// @group @carbon/type
|
|
32
|
-
$caption-01: (
|
|
33
|
-
font-size: carbon--type-scale(1),
|
|
34
|
-
font-weight: carbon--font-weight('regular'),
|
|
35
|
-
line-height: 1.33333,
|
|
36
|
-
letter-spacing: 0.32px,
|
|
37
|
-
) !default;
|
|
38
|
-
|
|
39
|
-
/// @type Map
|
|
40
|
-
/// @access public
|
|
41
|
-
/// @deprecated
|
|
42
|
-
/// @group @carbon/type
|
|
43
|
-
$caption-02: (
|
|
44
|
-
font-size: carbon--type-scale(2),
|
|
45
|
-
font-weight: carbon--font-weight('regular'),
|
|
46
|
-
line-height: 1.28572,
|
|
47
|
-
letter-spacing: 0.32px,
|
|
48
|
-
) !default;
|
|
10
|
+
@use 'sass:map';
|
|
11
|
+
@use 'sass:math';
|
|
12
|
+
@use '@carbon/grid/scss/config' as gridconfig;
|
|
13
|
+
@use '@carbon/grid/scss/breakpoint' as grid;
|
|
14
|
+
@use 'font-family';
|
|
15
|
+
@use 'scale';
|
|
49
16
|
|
|
50
17
|
/// @type Map
|
|
51
18
|
/// @access public
|
|
52
19
|
/// @group @carbon/type
|
|
53
20
|
$label-01: (
|
|
54
|
-
font-size:
|
|
55
|
-
font-weight:
|
|
21
|
+
font-size: scale.type-scale(1),
|
|
22
|
+
font-weight: font-family.font-weight('regular'),
|
|
56
23
|
line-height: 1.33333,
|
|
57
24
|
letter-spacing: 0.32px,
|
|
58
25
|
) !default;
|
|
59
26
|
|
|
60
|
-
/// @type Map
|
|
61
|
-
/// @access public
|
|
62
|
-
/// @group @carbon/type
|
|
63
|
-
$label-02: (
|
|
64
|
-
font-size: carbon--type-scale(2),
|
|
65
|
-
font-weight: carbon--font-weight('regular'),
|
|
66
|
-
line-height: 1.28572,
|
|
67
|
-
letter-spacing: 0.16px,
|
|
68
|
-
) !default;
|
|
69
|
-
|
|
70
27
|
/// @type Map
|
|
71
28
|
/// @access public
|
|
72
29
|
/// @group @carbon/type
|
|
73
30
|
$legal-01: (
|
|
74
|
-
font-size:
|
|
75
|
-
font-weight:
|
|
31
|
+
font-size: scale.type-scale(1),
|
|
32
|
+
font-weight: font-family.font-weight('regular'),
|
|
76
33
|
line-height: 1.33333,
|
|
77
34
|
letter-spacing: 0.32px,
|
|
78
35
|
) !default;
|
|
@@ -81,8 +38,8 @@ $legal-01: (
|
|
|
81
38
|
/// @access public
|
|
82
39
|
/// @group @carbon/type
|
|
83
40
|
$legal-02: (
|
|
84
|
-
font-size:
|
|
85
|
-
font-weight:
|
|
41
|
+
font-size: scale.type-scale(2),
|
|
42
|
+
font-weight: font-family.font-weight('regular'),
|
|
86
43
|
line-height: 1.28572,
|
|
87
44
|
letter-spacing: 0.16px,
|
|
88
45
|
) !default;
|
|
@@ -92,28 +49,17 @@ $legal-02: (
|
|
|
92
49
|
/// @deprecated
|
|
93
50
|
/// @group @carbon/type
|
|
94
51
|
$helper-text-01: (
|
|
95
|
-
font-size:
|
|
52
|
+
font-size: scale.type-scale(1),
|
|
96
53
|
line-height: 1.33333,
|
|
97
54
|
letter-spacing: 0.32px,
|
|
98
55
|
) !default;
|
|
99
56
|
|
|
100
|
-
/// @type Map
|
|
101
|
-
/// @access public
|
|
102
|
-
/// @deprecated
|
|
103
|
-
/// @group @carbon/type
|
|
104
|
-
$helper-text-02: (
|
|
105
|
-
font-size: carbon--type-scale(2),
|
|
106
|
-
font-weight: carbon--font-weight('regular'),
|
|
107
|
-
line-height: 1.28572,
|
|
108
|
-
letter-spacing: 0.16px,
|
|
109
|
-
) !default;
|
|
110
|
-
|
|
111
57
|
/// @type Map
|
|
112
58
|
/// @access public
|
|
113
59
|
/// @group @carbon/type
|
|
114
60
|
$body-short-01: (
|
|
115
|
-
font-size:
|
|
116
|
-
font-weight:
|
|
61
|
+
font-size: scale.type-scale(2),
|
|
62
|
+
font-weight: font-family.font-weight('regular'),
|
|
117
63
|
line-height: 1.28572,
|
|
118
64
|
letter-spacing: 0.16px,
|
|
119
65
|
) !default;
|
|
@@ -127,8 +73,8 @@ $body-compact-01: $body-short-01 !default;
|
|
|
127
73
|
/// @access public
|
|
128
74
|
/// @group @carbon/type
|
|
129
75
|
$body-long-01: (
|
|
130
|
-
font-size:
|
|
131
|
-
font-weight:
|
|
76
|
+
font-size: scale.type-scale(2),
|
|
77
|
+
font-weight: font-family.font-weight('regular'),
|
|
132
78
|
line-height: 1.42857,
|
|
133
79
|
letter-spacing: 0.16px,
|
|
134
80
|
) !default;
|
|
@@ -142,8 +88,8 @@ $body-01: $body-long-01 !default;
|
|
|
142
88
|
/// @access public
|
|
143
89
|
/// @group @carbon/type
|
|
144
90
|
$body-short-02: (
|
|
145
|
-
font-size:
|
|
146
|
-
font-weight:
|
|
91
|
+
font-size: scale.type-scale(3),
|
|
92
|
+
font-weight: font-family.font-weight('regular'),
|
|
147
93
|
line-height: 1.375,
|
|
148
94
|
letter-spacing: 0,
|
|
149
95
|
) !default;
|
|
@@ -157,8 +103,8 @@ $body-compact-02: $body-short-02 !default;
|
|
|
157
103
|
/// @access public
|
|
158
104
|
/// @group @carbon/type
|
|
159
105
|
$body-long-02: (
|
|
160
|
-
font-size:
|
|
161
|
-
font-weight:
|
|
106
|
+
font-size: scale.type-scale(3),
|
|
107
|
+
font-weight: font-family.font-weight('regular'),
|
|
162
108
|
line-height: 1.5,
|
|
163
109
|
letter-spacing: 0,
|
|
164
110
|
) !default;
|
|
@@ -172,9 +118,9 @@ $body-02: $body-long-02 !default;
|
|
|
172
118
|
/// @access public
|
|
173
119
|
/// @group @carbon/type
|
|
174
120
|
$code-01: (
|
|
175
|
-
font-family:
|
|
176
|
-
font-size:
|
|
177
|
-
font-weight:
|
|
121
|
+
font-family: font-family.font-family('mono'),
|
|
122
|
+
font-size: scale.type-scale(1),
|
|
123
|
+
font-weight: font-family.font-weight('regular'),
|
|
178
124
|
line-height: 1.33333,
|
|
179
125
|
letter-spacing: 0.32px,
|
|
180
126
|
) !default;
|
|
@@ -183,9 +129,9 @@ $code-01: (
|
|
|
183
129
|
/// @access public
|
|
184
130
|
/// @group @carbon/type
|
|
185
131
|
$code-02: (
|
|
186
|
-
font-family:
|
|
187
|
-
font-size:
|
|
188
|
-
font-weight:
|
|
132
|
+
font-family: font-family.font-family('mono'),
|
|
133
|
+
font-size: scale.type-scale(2),
|
|
134
|
+
font-weight: font-family.font-weight('regular'),
|
|
189
135
|
line-height: 1.42857,
|
|
190
136
|
letter-spacing: 0.32px,
|
|
191
137
|
) !default;
|
|
@@ -194,8 +140,8 @@ $code-02: (
|
|
|
194
140
|
/// @access public
|
|
195
141
|
/// @group @carbon/type
|
|
196
142
|
$heading-01: (
|
|
197
|
-
font-size:
|
|
198
|
-
font-weight:
|
|
143
|
+
font-size: scale.type-scale(2),
|
|
144
|
+
font-weight: font-family.font-weight('semibold'),
|
|
199
145
|
line-height: 1.42857,
|
|
200
146
|
letter-spacing: 0.16px,
|
|
201
147
|
) !default;
|
|
@@ -204,8 +150,8 @@ $heading-01: (
|
|
|
204
150
|
/// @access public
|
|
205
151
|
/// @group @carbon/type
|
|
206
152
|
$productive-heading-01: (
|
|
207
|
-
font-size:
|
|
208
|
-
font-weight:
|
|
153
|
+
font-size: scale.type-scale(2),
|
|
154
|
+
font-weight: font-family.font-weight('semibold'),
|
|
209
155
|
line-height: 1.28572,
|
|
210
156
|
letter-spacing: 0.16px,
|
|
211
157
|
) !default;
|
|
@@ -219,8 +165,8 @@ $heading-compact-01: $productive-heading-01 !default;
|
|
|
219
165
|
/// @access public
|
|
220
166
|
/// @group @carbon/type
|
|
221
167
|
$heading-02: (
|
|
222
|
-
font-size:
|
|
223
|
-
font-weight:
|
|
168
|
+
font-size: scale.type-scale(3),
|
|
169
|
+
font-weight: font-family.font-weight('semibold'),
|
|
224
170
|
line-height: 1.5,
|
|
225
171
|
letter-spacing: 0,
|
|
226
172
|
) !default;
|
|
@@ -229,24 +175,23 @@ $heading-02: (
|
|
|
229
175
|
/// @access public
|
|
230
176
|
/// @group @carbon/type
|
|
231
177
|
$productive-heading-02: (
|
|
232
|
-
font-size:
|
|
233
|
-
font-weight:
|
|
178
|
+
font-size: scale.type-scale(3),
|
|
179
|
+
font-weight: font-family.font-weight('semibold'),
|
|
234
180
|
line-height: 1.375,
|
|
235
181
|
letter-spacing: 0,
|
|
236
182
|
) !default;
|
|
237
183
|
|
|
184
|
+
/// @type Map
|
|
185
|
+
/// @access public
|
|
186
|
+
/// @group @carbon/type
|
|
238
187
|
$heading-compact-02: $productive-heading-02 !default;
|
|
239
188
|
|
|
240
|
-
// Question for designers:
|
|
241
|
-
// heading-02 currently maps to productive heading-02
|
|
242
|
-
// what are the styles for heading-compact-02?
|
|
243
|
-
|
|
244
189
|
/// @type Map
|
|
245
190
|
/// @access public
|
|
246
191
|
/// @group @carbon/type
|
|
247
192
|
$productive-heading-03: (
|
|
248
|
-
font-size:
|
|
249
|
-
font-weight:
|
|
193
|
+
font-size: scale.type-scale(5),
|
|
194
|
+
font-weight: font-family.font-weight('regular'),
|
|
250
195
|
line-height: 1.4,
|
|
251
196
|
letter-spacing: 0,
|
|
252
197
|
) !default;
|
|
@@ -260,8 +205,8 @@ $heading-03: $productive-heading-03 !default;
|
|
|
260
205
|
/// @access public
|
|
261
206
|
/// @group @carbon/type
|
|
262
207
|
$productive-heading-04: (
|
|
263
|
-
font-size:
|
|
264
|
-
font-weight:
|
|
208
|
+
font-size: scale.type-scale(7),
|
|
209
|
+
font-weight: font-family.font-weight('regular'),
|
|
265
210
|
line-height: 1.28572,
|
|
266
211
|
letter-spacing: 0,
|
|
267
212
|
) !default;
|
|
@@ -275,8 +220,8 @@ $heading-04: $productive-heading-04 !default;
|
|
|
275
220
|
/// @access public
|
|
276
221
|
/// @group @carbon/type
|
|
277
222
|
$productive-heading-05: (
|
|
278
|
-
font-size:
|
|
279
|
-
font-weight:
|
|
223
|
+
font-size: scale.type-scale(8),
|
|
224
|
+
font-weight: font-family.font-weight('regular'),
|
|
280
225
|
line-height: 1.25,
|
|
281
226
|
letter-spacing: 0,
|
|
282
227
|
) !default;
|
|
@@ -290,8 +235,8 @@ $heading-05: $productive-heading-05 !default;
|
|
|
290
235
|
/// @access public
|
|
291
236
|
/// @group @carbon/type
|
|
292
237
|
$productive-heading-06: (
|
|
293
|
-
font-size:
|
|
294
|
-
font-weight:
|
|
238
|
+
font-size: scale.type-scale(8),
|
|
239
|
+
font-weight: font-family.font-weight('light'),
|
|
295
240
|
// Extra digit needed for precision in Chrome
|
|
296
241
|
line-height: 1.199,
|
|
297
242
|
letter-spacing: 0,
|
|
@@ -306,8 +251,8 @@ $heading-06: $productive-heading-06 !default;
|
|
|
306
251
|
/// @access public
|
|
307
252
|
/// @group @carbon/type
|
|
308
253
|
$productive-heading-07: (
|
|
309
|
-
font-size:
|
|
310
|
-
font-weight:
|
|
254
|
+
font-size: scale.type-scale(10),
|
|
255
|
+
font-weight: font-family.font-weight('light'),
|
|
311
256
|
line-height: 1.19,
|
|
312
257
|
letter-spacing: 0,
|
|
313
258
|
) !default;
|
|
@@ -331,18 +276,18 @@ $expressive-heading-02: $heading-02 !default;
|
|
|
331
276
|
/// @access public
|
|
332
277
|
/// @group @carbon/type
|
|
333
278
|
$expressive-heading-03: (
|
|
334
|
-
font-size:
|
|
335
|
-
font-weight:
|
|
279
|
+
font-size: scale.type-scale(5),
|
|
280
|
+
font-weight: font-family.font-weight('regular'),
|
|
336
281
|
line-height: 1.4,
|
|
337
282
|
letter-spacing: 0,
|
|
338
283
|
breakpoints: (
|
|
339
284
|
xlg: (
|
|
340
|
-
font-size:
|
|
285
|
+
font-size: scale.type-scale(5),
|
|
341
286
|
line-height: 1.25,
|
|
342
287
|
),
|
|
343
288
|
max: (
|
|
344
|
-
font-size:
|
|
345
|
-
line-height: 1.
|
|
289
|
+
font-size: scale.type-scale(6),
|
|
290
|
+
line-height: 1.334,
|
|
346
291
|
),
|
|
347
292
|
),
|
|
348
293
|
) !default;
|
|
@@ -356,17 +301,17 @@ $fluid-heading-03: $expressive-heading-03 !default;
|
|
|
356
301
|
/// @access public
|
|
357
302
|
/// @group @carbon/type
|
|
358
303
|
$expressive-heading-04: (
|
|
359
|
-
font-size:
|
|
360
|
-
font-weight:
|
|
304
|
+
font-size: scale.type-scale(7),
|
|
305
|
+
font-weight: font-family.font-weight('regular'),
|
|
361
306
|
line-height: 1.28572,
|
|
362
307
|
letter-spacing: 0,
|
|
363
308
|
breakpoints: (
|
|
364
309
|
xlg: (
|
|
365
|
-
font-size:
|
|
310
|
+
font-size: scale.type-scale(7),
|
|
366
311
|
line-height: 1.25,
|
|
367
312
|
),
|
|
368
313
|
max: (
|
|
369
|
-
font-size:
|
|
314
|
+
font-size: scale.type-scale(8),
|
|
370
315
|
),
|
|
371
316
|
),
|
|
372
317
|
) !default;
|
|
@@ -380,26 +325,26 @@ $fluid-heading-04: $expressive-heading-04 !default;
|
|
|
380
325
|
/// @access public
|
|
381
326
|
/// @group @carbon/type
|
|
382
327
|
$expressive-heading-05: (
|
|
383
|
-
font-size:
|
|
384
|
-
font-weight:
|
|
328
|
+
font-size: scale.type-scale(8),
|
|
329
|
+
font-weight: font-family.font-weight('regular'),
|
|
385
330
|
line-height: 1.25,
|
|
386
331
|
letter-spacing: 0,
|
|
387
332
|
breakpoints: (
|
|
388
333
|
md: (
|
|
389
|
-
font-size:
|
|
390
|
-
font-weight:
|
|
334
|
+
font-size: scale.type-scale(9),
|
|
335
|
+
font-weight: font-family.font-weight('light'),
|
|
391
336
|
line-height: 1.22,
|
|
392
337
|
),
|
|
393
338
|
lg: (
|
|
394
|
-
font-size:
|
|
339
|
+
font-size: scale.type-scale(10),
|
|
395
340
|
line-height: 1.19,
|
|
396
341
|
),
|
|
397
342
|
xlg: (
|
|
398
|
-
font-size:
|
|
343
|
+
font-size: scale.type-scale(11),
|
|
399
344
|
line-height: 1.17,
|
|
400
345
|
),
|
|
401
346
|
max: (
|
|
402
|
-
font-size:
|
|
347
|
+
font-size: scale.type-scale(13),
|
|
403
348
|
),
|
|
404
349
|
),
|
|
405
350
|
) !default;
|
|
@@ -413,25 +358,25 @@ $fluid-heading-05: $expressive-heading-05 !default;
|
|
|
413
358
|
/// @access public
|
|
414
359
|
/// @group @carbon/type
|
|
415
360
|
$expressive-heading-06: (
|
|
416
|
-
font-size:
|
|
417
|
-
font-weight:
|
|
361
|
+
font-size: scale.type-scale(8),
|
|
362
|
+
font-weight: font-family.font-weight('semibold'),
|
|
418
363
|
line-height: 1.25,
|
|
419
364
|
letter-spacing: 0,
|
|
420
365
|
breakpoints: (
|
|
421
366
|
md: (
|
|
422
|
-
font-size:
|
|
367
|
+
font-size: scale.type-scale(9),
|
|
423
368
|
line-height: 1.22,
|
|
424
369
|
),
|
|
425
370
|
lg: (
|
|
426
|
-
font-size:
|
|
371
|
+
font-size: scale.type-scale(10),
|
|
427
372
|
line-height: 1.19,
|
|
428
373
|
),
|
|
429
374
|
xlg: (
|
|
430
|
-
font-size:
|
|
375
|
+
font-size: scale.type-scale(11),
|
|
431
376
|
line-height: 1.17,
|
|
432
377
|
),
|
|
433
378
|
max: (
|
|
434
|
-
font-size:
|
|
379
|
+
font-size: scale.type-scale(13),
|
|
435
380
|
),
|
|
436
381
|
),
|
|
437
382
|
) !default;
|
|
@@ -445,17 +390,17 @@ $fluid-heading-06: $expressive-heading-06 !default;
|
|
|
445
390
|
/// @access public
|
|
446
391
|
/// @group @carbon/type
|
|
447
392
|
$expressive-paragraph-01: (
|
|
448
|
-
font-size:
|
|
449
|
-
font-weight:
|
|
450
|
-
line-height: 1.
|
|
393
|
+
font-size: scale.type-scale(6),
|
|
394
|
+
font-weight: font-family.font-weight('light'),
|
|
395
|
+
line-height: 1.334,
|
|
451
396
|
letter-spacing: 0,
|
|
452
397
|
breakpoints: (
|
|
453
398
|
lg: (
|
|
454
|
-
font-size:
|
|
399
|
+
font-size: scale.type-scale(7),
|
|
455
400
|
line-height: 1.28572,
|
|
456
401
|
),
|
|
457
402
|
max: (
|
|
458
|
-
font-size:
|
|
403
|
+
font-size: scale.type-scale(8),
|
|
459
404
|
line-height: 1.25,
|
|
460
405
|
),
|
|
461
406
|
),
|
|
@@ -470,25 +415,25 @@ $fluid-paragraph-01: $expressive-paragraph-01 !default;
|
|
|
470
415
|
/// @access public
|
|
471
416
|
/// @group @carbon/type
|
|
472
417
|
$quotation-01: (
|
|
473
|
-
font-family:
|
|
474
|
-
font-size:
|
|
475
|
-
font-weight:
|
|
418
|
+
font-family: font-family.font-family('serif'),
|
|
419
|
+
font-size: scale.type-scale(5),
|
|
420
|
+
font-weight: font-family.font-weight('regular'),
|
|
476
421
|
line-height: 1.3,
|
|
477
422
|
letter-spacing: 0,
|
|
478
423
|
breakpoints: (
|
|
479
424
|
md: (
|
|
480
|
-
font-size:
|
|
425
|
+
font-size: scale.type-scale(5),
|
|
481
426
|
),
|
|
482
427
|
lg: (
|
|
483
|
-
font-size:
|
|
484
|
-
line-height: 1.
|
|
428
|
+
font-size: scale.type-scale(6),
|
|
429
|
+
line-height: 1.334,
|
|
485
430
|
),
|
|
486
431
|
xlg: (
|
|
487
|
-
font-size:
|
|
432
|
+
font-size: scale.type-scale(7),
|
|
488
433
|
line-height: 1.28572,
|
|
489
434
|
),
|
|
490
435
|
max: (
|
|
491
|
-
font-size:
|
|
436
|
+
font-size: scale.type-scale(8),
|
|
492
437
|
line-height: 1.25,
|
|
493
438
|
),
|
|
494
439
|
),
|
|
@@ -503,26 +448,26 @@ $fluid-quotation-01: $quotation-01 !default;
|
|
|
503
448
|
/// @access public
|
|
504
449
|
/// @group @carbon/type
|
|
505
450
|
$quotation-02: (
|
|
506
|
-
font-family:
|
|
507
|
-
font-size:
|
|
508
|
-
font-weight:
|
|
451
|
+
font-family: font-family.font-family('serif'),
|
|
452
|
+
font-size: scale.type-scale(8),
|
|
453
|
+
font-weight: font-family.font-weight('light'),
|
|
509
454
|
line-height: 1.25,
|
|
510
455
|
letter-spacing: 0,
|
|
511
456
|
breakpoints: (
|
|
512
457
|
md: (
|
|
513
|
-
font-size:
|
|
458
|
+
font-size: scale.type-scale(9),
|
|
514
459
|
line-height: 1.22,
|
|
515
460
|
),
|
|
516
461
|
lg: (
|
|
517
|
-
font-size:
|
|
462
|
+
font-size: scale.type-scale(10),
|
|
518
463
|
line-height: 1.19,
|
|
519
464
|
),
|
|
520
465
|
xlg: (
|
|
521
|
-
font-size:
|
|
466
|
+
font-size: scale.type-scale(11),
|
|
522
467
|
line-height: 1.17,
|
|
523
468
|
),
|
|
524
469
|
max: (
|
|
525
|
-
font-size:
|
|
470
|
+
font-size: scale.type-scale(13),
|
|
526
471
|
),
|
|
527
472
|
),
|
|
528
473
|
) !default;
|
|
@@ -536,23 +481,23 @@ $fluid-quotation-02: $quotation-02 !default;
|
|
|
536
481
|
/// @access public
|
|
537
482
|
/// @group @carbon/type
|
|
538
483
|
$display-01: (
|
|
539
|
-
font-size:
|
|
540
|
-
font-weight:
|
|
484
|
+
font-size: scale.type-scale(10),
|
|
485
|
+
font-weight: font-family.font-weight('light'),
|
|
541
486
|
line-height: 1.19,
|
|
542
487
|
letter-spacing: 0,
|
|
543
488
|
breakpoints: (
|
|
544
489
|
md: (
|
|
545
|
-
font-size:
|
|
490
|
+
font-size: scale.type-scale(10),
|
|
546
491
|
),
|
|
547
492
|
lg: (
|
|
548
|
-
font-size:
|
|
493
|
+
font-size: scale.type-scale(12),
|
|
549
494
|
),
|
|
550
495
|
xlg: (
|
|
551
|
-
font-size:
|
|
496
|
+
font-size: scale.type-scale(13),
|
|
552
497
|
line-height: 1.17,
|
|
553
498
|
),
|
|
554
499
|
max: (
|
|
555
|
-
font-size:
|
|
500
|
+
font-size: scale.type-scale(15),
|
|
556
501
|
line-height: 1.13,
|
|
557
502
|
),
|
|
558
503
|
),
|
|
@@ -567,23 +512,23 @@ $fluid-display-01: $display-01 !default;
|
|
|
567
512
|
/// @access public
|
|
568
513
|
/// @group @carbon/type
|
|
569
514
|
$display-02: (
|
|
570
|
-
font-size:
|
|
571
|
-
font-weight:
|
|
515
|
+
font-size: scale.type-scale(10),
|
|
516
|
+
font-weight: font-family.font-weight('semibold'),
|
|
572
517
|
line-height: 1.19,
|
|
573
518
|
letter-spacing: 0,
|
|
574
519
|
breakpoints: (
|
|
575
520
|
md: (
|
|
576
|
-
font-size:
|
|
521
|
+
font-size: scale.type-scale(10),
|
|
577
522
|
),
|
|
578
523
|
lg: (
|
|
579
|
-
font-size:
|
|
524
|
+
font-size: scale.type-scale(12),
|
|
580
525
|
),
|
|
581
526
|
xlg: (
|
|
582
|
-
font-size:
|
|
527
|
+
font-size: scale.type-scale(13),
|
|
583
528
|
line-height: 1.16,
|
|
584
529
|
),
|
|
585
530
|
max: (
|
|
586
|
-
font-size:
|
|
531
|
+
font-size: scale.type-scale(15),
|
|
587
532
|
line-height: 1.13,
|
|
588
533
|
),
|
|
589
534
|
),
|
|
@@ -598,27 +543,27 @@ $fluid-display-02: $display-02 !default;
|
|
|
598
543
|
/// @access public
|
|
599
544
|
/// @group @carbon/type
|
|
600
545
|
$display-03: (
|
|
601
|
-
font-size:
|
|
602
|
-
font-weight:
|
|
546
|
+
font-size: scale.type-scale(10),
|
|
547
|
+
font-weight: font-family.font-weight('light'),
|
|
603
548
|
line-height: 1.19,
|
|
604
549
|
letter-spacing: 0,
|
|
605
550
|
breakpoints: (
|
|
606
551
|
md: (
|
|
607
|
-
font-size:
|
|
552
|
+
font-size: scale.type-scale(14),
|
|
608
553
|
line-height: 1.15,
|
|
609
554
|
),
|
|
610
555
|
lg: (
|
|
611
|
-
font-size:
|
|
556
|
+
font-size: scale.type-scale(17),
|
|
612
557
|
line-height: 1.11,
|
|
613
558
|
letter-spacing: -0.64px,
|
|
614
559
|
),
|
|
615
560
|
xlg: (
|
|
616
|
-
font-size:
|
|
561
|
+
font-size: scale.type-scale(20),
|
|
617
562
|
line-height: 1.07,
|
|
618
563
|
letter-spacing: -0.64px,
|
|
619
564
|
),
|
|
620
565
|
max: (
|
|
621
|
-
font-size:
|
|
566
|
+
font-size: scale.type-scale(23),
|
|
622
567
|
line-height: 1.05,
|
|
623
568
|
letter-spacing: -0.96px,
|
|
624
569
|
),
|
|
@@ -634,27 +579,27 @@ $fluid-display-03: $display-03 !default;
|
|
|
634
579
|
/// @access public
|
|
635
580
|
/// @group @carbon/type
|
|
636
581
|
$display-04: (
|
|
637
|
-
font-size:
|
|
638
|
-
font-weight:
|
|
582
|
+
font-size: scale.type-scale(10),
|
|
583
|
+
font-weight: font-family.font-weight('semibold'),
|
|
639
584
|
line-height: 1.19,
|
|
640
585
|
letter-spacing: 0,
|
|
641
586
|
breakpoints: (
|
|
642
587
|
md: (
|
|
643
|
-
font-size:
|
|
588
|
+
font-size: scale.type-scale(14),
|
|
644
589
|
line-height: 1.15,
|
|
645
590
|
),
|
|
646
591
|
lg: (
|
|
647
|
-
font-size:
|
|
592
|
+
font-size: scale.type-scale(17),
|
|
648
593
|
line-height: 1.11,
|
|
649
594
|
letter-spacing: -0.64px,
|
|
650
595
|
),
|
|
651
596
|
xlg: (
|
|
652
|
-
font-size:
|
|
597
|
+
font-size: scale.type-scale(20),
|
|
653
598
|
line-height: 1.07,
|
|
654
599
|
letter-spacing: -0.64px,
|
|
655
600
|
),
|
|
656
601
|
max: (
|
|
657
|
-
font-size:
|
|
602
|
+
font-size: scale.type-scale(23),
|
|
658
603
|
line-height: 1.05,
|
|
659
604
|
letter-spacing: -0.96px,
|
|
660
605
|
),
|
|
@@ -670,12 +615,8 @@ $fluid-display-04: $display-04 !default;
|
|
|
670
615
|
/// @access public
|
|
671
616
|
/// @group @carbon/type
|
|
672
617
|
$tokens: (
|
|
673
|
-
caption-01: $caption-01,
|
|
674
|
-
caption-02: $caption-02,
|
|
675
618
|
label-01: $label-01,
|
|
676
|
-
label-02: $label-02,
|
|
677
619
|
helper-text-01: $helper-text-01,
|
|
678
|
-
helper-text-02: $helper-text-02,
|
|
679
620
|
body-short-01: $body-short-01,
|
|
680
621
|
body-short-02: $body-short-02,
|
|
681
622
|
body-long-01: $body-long-01,
|
|
@@ -745,7 +686,7 @@ $tokens: (
|
|
|
745
686
|
/// @access public
|
|
746
687
|
/// @group @carbon/type
|
|
747
688
|
@function strip-unit($value) {
|
|
748
|
-
@return $value
|
|
689
|
+
@return math.div($value, $value * 0 + 1);
|
|
749
690
|
}
|
|
750
691
|
|
|
751
692
|
/// This helper includes fluid type styles for the given token value. Fluid type
|
|
@@ -761,14 +702,14 @@ $tokens: (
|
|
|
761
702
|
/// https://css-tricks.com/snippets/css/fluid-typography/
|
|
762
703
|
///
|
|
763
704
|
/// @param {Map} $type-styles - The value of a given type token
|
|
764
|
-
/// @param {Map} $breakpoints [$
|
|
705
|
+
/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use
|
|
765
706
|
/// @access public
|
|
766
707
|
/// @group @carbon/type
|
|
767
|
-
@mixin fluid-type($type-styles, $breakpoints:
|
|
708
|
+
@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {
|
|
768
709
|
// Include the initial styles for the given token by default without any
|
|
769
710
|
// media query guard. This includes `font-size` as a fallback in the case
|
|
770
711
|
// that a browser does not support `calc()`
|
|
771
|
-
@include properties(map
|
|
712
|
+
@include properties(map.remove($type-styles, breakpoints));
|
|
772
713
|
// We also need to include the `sm` styles by default since they don't
|
|
773
714
|
// appear in the fluid styles for tokens
|
|
774
715
|
@include fluid-type-size($type-styles, sm, $breakpoints);
|
|
@@ -776,8 +717,8 @@ $tokens: (
|
|
|
776
717
|
// Finally, we need to go through all the breakpoints defined in the type
|
|
777
718
|
// token and apply the properties and fluid type size for that given
|
|
778
719
|
// breakpoint
|
|
779
|
-
@each $name, $values in map
|
|
780
|
-
@include
|
|
720
|
+
@each $name, $values in map.get($type-styles, breakpoints) {
|
|
721
|
+
@include grid.breakpoint($name) {
|
|
781
722
|
@include properties($values);
|
|
782
723
|
@include fluid-type-size($type-styles, $name, $breakpoints);
|
|
783
724
|
}
|
|
@@ -787,44 +728,44 @@ $tokens: (
|
|
|
787
728
|
/// Computes the fluid `font-size` for a given type style and breakpoint
|
|
788
729
|
/// @param {Map} $type-styles - The styles for a given token
|
|
789
730
|
/// @param {String} $name - The name of the breakpoint to which we apply the fluid
|
|
790
|
-
/// @param {Map} $breakpoints [$
|
|
731
|
+
/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system
|
|
791
732
|
/// @access public
|
|
792
733
|
/// @group @carbon/type
|
|
793
734
|
@mixin fluid-type-size(
|
|
794
735
|
$type-styles,
|
|
795
736
|
$name,
|
|
796
|
-
$breakpoints:
|
|
737
|
+
$breakpoints: gridconfig.$grid-breakpoints
|
|
797
738
|
) {
|
|
798
739
|
// Get the information about the breakpoint we're currently working in. Useful
|
|
799
740
|
// for getting initial width information
|
|
800
|
-
$breakpoint: map
|
|
741
|
+
$breakpoint: map.get($breakpoints, $name);
|
|
801
742
|
|
|
802
743
|
// Our fluid styles are captured under the 'breakpoints' property in our type
|
|
803
744
|
// styles map. These define what values to treat as `max-` variables below
|
|
804
|
-
$fluid-sizes: map
|
|
745
|
+
$fluid-sizes: map.get($type-styles, breakpoints);
|
|
805
746
|
$fluid-breakpoint: ();
|
|
806
747
|
// Special case for `sm` because the styles for small are on the type style
|
|
807
748
|
// directly
|
|
808
749
|
@if $name == sm {
|
|
809
|
-
$fluid-breakpoint: map
|
|
750
|
+
$fluid-breakpoint: map.remove($type-styles, breakpoints);
|
|
810
751
|
} @else {
|
|
811
|
-
$fluid-breakpoint: map
|
|
752
|
+
$fluid-breakpoint: map.get($fluid-sizes, $name);
|
|
812
753
|
}
|
|
813
754
|
|
|
814
755
|
// Initialize our font-sizes to the default size for the type style
|
|
815
|
-
$max-font-size: map
|
|
816
|
-
$min-font-size: map
|
|
817
|
-
@if map
|
|
818
|
-
$min-font-size: map
|
|
756
|
+
$max-font-size: map.get($type-styles, font-size);
|
|
757
|
+
$min-font-size: map.get($type-styles, font-size);
|
|
758
|
+
@if map.has-key($fluid-breakpoint, font-size) {
|
|
759
|
+
$min-font-size: map.get($fluid-breakpoint, font-size);
|
|
819
760
|
}
|
|
820
761
|
|
|
821
762
|
// Initialize our min and max width to the width of the current breakpoint
|
|
822
|
-
$max-vw: map
|
|
823
|
-
$min-vw: map
|
|
763
|
+
$max-vw: map.get($breakpoint, width);
|
|
764
|
+
$min-vw: map.get($breakpoint, width);
|
|
824
765
|
|
|
825
766
|
// We can use `breakpoint-next` to see if there is another breakpoint we can
|
|
826
767
|
// use to update `max-font-size` and `max-vw` with larger values
|
|
827
|
-
$next-breakpoint-available:
|
|
768
|
+
$next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);
|
|
828
769
|
$next-fluid-breakpoint-name: null;
|
|
829
770
|
|
|
830
771
|
// We need to figure out what the next available fluid breakpoint is for our
|
|
@@ -832,11 +773,11 @@ $tokens: (
|
|
|
832
773
|
// until we either manually set $next-breakpoint-available to null or
|
|
833
774
|
// `breakpoint-next` returns null.
|
|
834
775
|
@while $next-breakpoint-available {
|
|
835
|
-
@if map
|
|
776
|
+
@if map.has-key($fluid-sizes, $next-breakpoint-available) {
|
|
836
777
|
$next-fluid-breakpoint-name: $next-breakpoint-available;
|
|
837
778
|
$next-breakpoint-available: null;
|
|
838
779
|
} @else {
|
|
839
|
-
$next-breakpoint-available:
|
|
780
|
+
$next-breakpoint-available: grid.breakpoint-next(
|
|
840
781
|
$next-breakpoint-available,
|
|
841
782
|
$breakpoints
|
|
842
783
|
);
|
|
@@ -847,12 +788,12 @@ $tokens: (
|
|
|
847
788
|
// that we have values that we can use to set max-font-size and max-vw as both
|
|
848
789
|
// values derive from the next breakpoint
|
|
849
790
|
@if $next-fluid-breakpoint-name {
|
|
850
|
-
$next-fluid-breakpoint: map
|
|
851
|
-
$max-font-size: map
|
|
852
|
-
map
|
|
791
|
+
$next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);
|
|
792
|
+
$max-font-size: map.get(
|
|
793
|
+
map.get($fluid-sizes, $next-fluid-breakpoint-name),
|
|
853
794
|
font-size
|
|
854
795
|
);
|
|
855
|
-
$max-vw: map
|
|
796
|
+
$max-vw: map.get($next-fluid-breakpoint, width);
|
|
856
797
|
|
|
857
798
|
// prettier-ignore
|
|
858
799
|
font-size: calc(#{$min-font-size} +
|
|
@@ -891,34 +832,25 @@ $custom-property-prefix: 'cds' !default;
|
|
|
891
832
|
/// with caution in fixed contexts.
|
|
892
833
|
/// @param {String} $name - The name of the token to get the styles for
|
|
893
834
|
/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the
|
|
894
|
-
/// @param {Map} $breakpoints [$
|
|
835
|
+
/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use
|
|
895
836
|
/// @access public
|
|
896
837
|
/// @group @carbon/type
|
|
897
|
-
@mixin
|
|
838
|
+
@mixin type-style(
|
|
898
839
|
$name,
|
|
899
840
|
$fluid: false,
|
|
900
|
-
$breakpoints:
|
|
841
|
+
$breakpoints: gridconfig.$grid-breakpoints
|
|
901
842
|
) {
|
|
902
|
-
@if not map
|
|
843
|
+
@if not map.has-key($tokens, $name) {
|
|
903
844
|
@error 'Unable to find a token with the name: `#{$name}`';
|
|
904
845
|
}
|
|
905
846
|
|
|
906
|
-
$token: map
|
|
847
|
+
$token: map.get($tokens, $name);
|
|
907
848
|
|
|
908
849
|
// If $fluid is set to true and the token has breakpoints defined for fluid
|
|
909
850
|
// styles, delegate to the fluid-type helper for the given token
|
|
910
|
-
|
|
911
|
-
@if $fluid == true and map-has-key($token, 'breakpoints') {
|
|
851
|
+
@if $fluid == true and map.has-key($token, 'breakpoints') {
|
|
912
852
|
@include fluid-type($token, $breakpoints);
|
|
913
853
|
} @else {
|
|
914
|
-
@
|
|
915
|
-
map-get($feature-flags, 'enable-css-custom-properties')
|
|
916
|
-
{
|
|
917
|
-
@include custom-properties($name, map-remove($token, 'breakpoints'));
|
|
918
|
-
} @else {
|
|
919
|
-
// Otherwise, we just include all the property declarations directly on the
|
|
920
|
-
// selector
|
|
921
|
-
@include properties(map-remove($token, 'breakpoints'));
|
|
922
|
-
}
|
|
854
|
+
@include custom-properties($name, $token);
|
|
923
855
|
}
|
|
924
856
|
}
|