@carbon/type 10.34.0-rc.0 → 10.36.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/scss/_styles.scss CHANGED
@@ -4,6 +4,22 @@
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
+
22
+ /* stylelint-disable number-max-precision */
7
23
 
8
24
  @import '@carbon/layout/scss/breakpoint';
9
25
  @import 'font-family';
@@ -11,21 +27,23 @@
11
27
 
12
28
  /// @type Map
13
29
  /// @access public
30
+ /// @deprecated
14
31
  /// @group @carbon/type
15
32
  $caption-01: (
16
33
  font-size: carbon--type-scale(1),
17
34
  font-weight: carbon--font-weight('regular'),
18
- line-height: 1.34,
35
+ line-height: 1.33333,
19
36
  letter-spacing: 0.32px,
20
37
  ) !default;
21
38
 
22
39
  /// @type Map
23
40
  /// @access public
41
+ /// @deprecated
24
42
  /// @group @carbon/type
25
43
  $caption-02: (
26
44
  font-size: carbon--type-scale(2),
27
45
  font-weight: carbon--font-weight('regular'),
28
- line-height: 1.29,
46
+ line-height: 1.28572,
29
47
  letter-spacing: 0.32px,
30
48
  ) !default;
31
49
 
@@ -35,7 +53,7 @@ $caption-02: (
35
53
  $label-01: (
36
54
  font-size: carbon--type-scale(1),
37
55
  font-weight: carbon--font-weight('regular'),
38
- line-height: 1.34,
56
+ line-height: 1.33333,
39
57
  letter-spacing: 0.32px,
40
58
  ) !default;
41
59
 
@@ -45,27 +63,49 @@ $label-01: (
45
63
  $label-02: (
46
64
  font-size: carbon--type-scale(2),
47
65
  font-weight: carbon--font-weight('regular'),
48
- line-height: 1.29,
66
+ line-height: 1.28572,
67
+ letter-spacing: 0.16px,
68
+ ) !default;
69
+
70
+ /// @type Map
71
+ /// @access public
72
+ /// @group @carbon/type
73
+ $legal-01: (
74
+ font-size: carbon--type-scale(1),
75
+ font-weight: carbon--font-weight('regular'),
76
+ line-height: 1.33333,
49
77
  letter-spacing: 0.32px,
50
78
  ) !default;
51
79
 
52
80
  /// @type Map
53
81
  /// @access public
54
82
  /// @group @carbon/type
83
+ $legal-02: (
84
+ font-size: carbon--type-scale(2),
85
+ font-weight: carbon--font-weight('regular'),
86
+ line-height: 1.28572,
87
+ letter-spacing: 0.16px,
88
+ ) !default;
89
+
90
+ /// @type Map
91
+ /// @access public
92
+ /// @deprecated
93
+ /// @group @carbon/type
55
94
  $helper-text-01: (
56
95
  font-size: carbon--type-scale(1),
57
- line-height: 1.34,
96
+ line-height: 1.33333,
58
97
  letter-spacing: 0.32px,
59
98
  ) !default;
60
99
 
61
100
  /// @type Map
62
101
  /// @access public
102
+ /// @deprecated
63
103
  /// @group @carbon/type
64
104
  $helper-text-02: (
65
105
  font-size: carbon--type-scale(2),
66
106
  font-weight: carbon--font-weight('regular'),
67
- line-height: 1.29,
68
- letter-spacing: 0.32px,
107
+ line-height: 1.28572,
108
+ letter-spacing: 0.16px,
69
109
  ) !default;
70
110
 
71
111
  /// @type Map
@@ -74,20 +114,30 @@ $helper-text-02: (
74
114
  $body-short-01: (
75
115
  font-size: carbon--type-scale(2),
76
116
  font-weight: carbon--font-weight('regular'),
77
- line-height: 1.29,
117
+ line-height: 1.28572,
78
118
  letter-spacing: 0.16px,
79
119
  ) !default;
80
120
 
121
+ /// @type Map
122
+ /// @access public
123
+ /// @group @carbon/type
124
+ $body-compact-01: $body-short-01 !default;
125
+
81
126
  /// @type Map
82
127
  /// @access public
83
128
  /// @group @carbon/type
84
129
  $body-long-01: (
85
130
  font-size: carbon--type-scale(2),
86
131
  font-weight: carbon--font-weight('regular'),
87
- line-height: 1.43,
132
+ line-height: 1.42857,
88
133
  letter-spacing: 0.16px,
89
134
  ) !default;
90
135
 
136
+ /// @type Map
137
+ /// @access public
138
+ /// @group @carbon/type
139
+ $body-01: $body-long-01 !default;
140
+
91
141
  /// @type Map
92
142
  /// @access public
93
143
  /// @group @carbon/type
@@ -98,6 +148,11 @@ $body-short-02: (
98
148
  letter-spacing: 0,
99
149
  ) !default;
100
150
 
151
+ /// @type Map
152
+ /// @access public
153
+ /// @group @carbon/type
154
+ $body-compact-02: $body-short-02 !default;
155
+
101
156
  /// @type Map
102
157
  /// @access public
103
158
  /// @group @carbon/type
@@ -108,6 +163,11 @@ $body-long-02: (
108
163
  letter-spacing: 0,
109
164
  ) !default;
110
165
 
166
+ /// @type Map
167
+ /// @access public
168
+ /// @group @carbon/type
169
+ $body-02: $body-long-02 !default;
170
+
111
171
  /// @type Map
112
172
  /// @access public
113
173
  /// @group @carbon/type
@@ -115,7 +175,7 @@ $code-01: (
115
175
  font-family: carbon--font-family('mono'),
116
176
  font-size: carbon--type-scale(1),
117
177
  font-weight: carbon--font-weight('regular'),
118
- line-height: 1.34,
178
+ line-height: 1.33333,
119
179
  letter-spacing: 0.32px,
120
180
  ) !default;
121
181
 
@@ -126,7 +186,7 @@ $code-02: (
126
186
  font-family: carbon--font-family('mono'),
127
187
  font-size: carbon--type-scale(2),
128
188
  font-weight: carbon--font-weight('regular'),
129
- line-height: 1.43,
189
+ line-height: 1.42857,
130
190
  letter-spacing: 0.32px,
131
191
  ) !default;
132
192
 
@@ -136,14 +196,24 @@ $code-02: (
136
196
  $heading-01: (
137
197
  font-size: carbon--type-scale(2),
138
198
  font-weight: carbon--font-weight('semibold'),
139
- line-height: 1.29,
199
+ line-height: 1.42857,
200
+ letter-spacing: 0.16px,
201
+ ) !default;
202
+
203
+ /// @type Map
204
+ /// @access public
205
+ /// @group @carbon/type
206
+ $productive-heading-01: (
207
+ font-size: carbon--type-scale(2),
208
+ font-weight: carbon--font-weight('semibold'),
209
+ line-height: 1.28572,
140
210
  letter-spacing: 0.16px,
141
211
  ) !default;
142
212
 
143
213
  /// @type Map
144
214
  /// @access public
145
215
  /// @group @carbon/type
146
- $productive-heading-01: $heading-01 !default;
216
+ $heading-compact-01: $productive-heading-01 !default;
147
217
 
148
218
  /// @type Map
149
219
  /// @access public
@@ -151,14 +221,25 @@ $productive-heading-01: $heading-01 !default;
151
221
  $heading-02: (
152
222
  font-size: carbon--type-scale(3),
153
223
  font-weight: carbon--font-weight('semibold'),
154
- line-height: 1.375,
224
+ line-height: 1.5,
155
225
  letter-spacing: 0,
156
226
  ) !default;
157
227
 
158
228
  /// @type Map
159
229
  /// @access public
160
230
  /// @group @carbon/type
161
- $productive-heading-02: $heading-02 !default;
231
+ $productive-heading-02: (
232
+ font-size: carbon--type-scale(3),
233
+ font-weight: carbon--font-weight('semibold'),
234
+ line-height: 1.375,
235
+ letter-spacing: 0,
236
+ ) !default;
237
+
238
+ $heading-compact-02: $productive-heading-02 !default;
239
+
240
+ // Question for designers:
241
+ // heading-02 currently maps to productive heading-02
242
+ // what are the styles for heading-compact-02?
162
243
 
163
244
  /// @type Map
164
245
  /// @access public
@@ -170,16 +251,26 @@ $productive-heading-03: (
170
251
  letter-spacing: 0,
171
252
  ) !default;
172
253
 
254
+ /// @type Map
255
+ /// @access public
256
+ /// @group @carbon/type
257
+ $heading-03: $productive-heading-03 !default;
258
+
173
259
  /// @type Map
174
260
  /// @access public
175
261
  /// @group @carbon/type
176
262
  $productive-heading-04: (
177
263
  font-size: carbon--type-scale(7),
178
264
  font-weight: carbon--font-weight('regular'),
179
- line-height: 1.29,
265
+ line-height: 1.28572,
180
266
  letter-spacing: 0,
181
267
  ) !default;
182
268
 
269
+ /// @type Map
270
+ /// @access public
271
+ /// @group @carbon/type
272
+ $heading-04: $productive-heading-04 !default;
273
+
183
274
  /// @type Map
184
275
  /// @access public
185
276
  /// @group @carbon/type
@@ -190,22 +281,32 @@ $productive-heading-05: (
190
281
  letter-spacing: 0,
191
282
  ) !default;
192
283
 
284
+ /// @type Map
285
+ /// @access public
286
+ /// @group @carbon/type
287
+ $heading-05: $productive-heading-05 !default;
288
+
193
289
  /// @type Map
194
290
  /// @access public
195
291
  /// @group @carbon/type
196
292
  $productive-heading-06: (
197
- font-size: carbon--type-scale(8),
293
+ font-size: carbon--type-scale(10),
198
294
  font-weight: carbon--font-weight('light'),
199
295
  // Extra digit needed for precision in Chrome
200
296
  line-height: 1.199,
201
297
  letter-spacing: 0,
202
298
  ) !default;
203
299
 
300
+ /// @type Map
301
+ /// @access public
302
+ /// @group @carbon/type
303
+ $heading-06: $productive-heading-06 !default;
304
+
204
305
  /// @type Map
205
306
  /// @access public
206
307
  /// @group @carbon/type
207
308
  $productive-heading-07: (
208
- font-size: carbon--type-scale(10),
309
+ font-size: carbon--type-scale(12),
209
310
  font-weight: carbon--font-weight('light'),
210
311
  line-height: 1.19,
211
312
  letter-spacing: 0,
@@ -214,22 +315,17 @@ $productive-heading-07: (
214
315
  /// @type Map
215
316
  /// @access public
216
317
  /// @group @carbon/type
217
- $expressive-heading-01: map-merge(
218
- $heading-01,
219
- (
220
- line-height: 1.25,
221
- )
222
- ) !default;
318
+ $heading-07: $productive-heading-07 !default;
223
319
 
224
320
  /// @type Map
225
321
  /// @access public
226
322
  /// @group @carbon/type
227
- $expressive-heading-02: map-merge(
228
- $heading-02,
229
- (
230
- line-height: 1.5,
231
- )
232
- ) !default;
323
+ $expressive-heading-01: $heading-01 !default;
324
+
325
+ /// @type Map
326
+ /// @access public
327
+ /// @group @carbon/type
328
+ $expressive-heading-02: $heading-02 !default;
233
329
 
234
330
  /// @type Map
235
331
  /// @access public
@@ -246,18 +342,23 @@ $expressive-heading-03: (
246
342
  ),
247
343
  max: (
248
344
  font-size: carbon--type-scale(6),
249
- line-height: 1.334,
345
+ line-height: 1.33333,
250
346
  ),
251
347
  ),
252
348
  ) !default;
253
349
 
350
+ /// @type Map
351
+ /// @access public
352
+ /// @group @carbon/type
353
+ $fluid-heading-03: $expressive-heading-03 !default;
354
+
254
355
  /// @type Map
255
356
  /// @access public
256
357
  /// @group @carbon/type
257
358
  $expressive-heading-04: (
258
359
  font-size: carbon--type-scale(7),
259
360
  font-weight: carbon--font-weight('regular'),
260
- line-height: 1.29,
361
+ line-height: 1.28572,
261
362
  letter-spacing: 0,
262
363
  breakpoints: (
263
364
  xlg: (
@@ -270,6 +371,11 @@ $expressive-heading-04: (
270
371
  ),
271
372
  ) !default;
272
373
 
374
+ /// @type Map
375
+ /// @access public
376
+ /// @group @carbon/type
377
+ $fluid-heading-04: $expressive-heading-04 !default;
378
+
273
379
  /// @type Map
274
380
  /// @access public
275
381
  /// @group @carbon/type
@@ -298,6 +404,11 @@ $expressive-heading-05: (
298
404
  ),
299
405
  ) !default;
300
406
 
407
+ /// @type Map
408
+ /// @access public
409
+ /// @group @carbon/type
410
+ $fluid-heading-05: $expressive-heading-05 !default;
411
+
301
412
  /// @type Map
302
413
  /// @access public
303
414
  /// @group @carbon/type
@@ -325,18 +436,23 @@ $expressive-heading-06: (
325
436
  ),
326
437
  ) !default;
327
438
 
439
+ /// @type Map
440
+ /// @access public
441
+ /// @group @carbon/type
442
+ $fluid-heading-06: $expressive-heading-06 !default;
443
+
328
444
  /// @type Map
329
445
  /// @access public
330
446
  /// @group @carbon/type
331
447
  $expressive-paragraph-01: (
332
448
  font-size: carbon--type-scale(6),
333
449
  font-weight: carbon--font-weight('light'),
334
- line-height: 1.334,
450
+ line-height: 1.33333,
335
451
  letter-spacing: 0,
336
452
  breakpoints: (
337
453
  lg: (
338
454
  font-size: carbon--type-scale(7),
339
- line-height: 1.29,
455
+ line-height: 1.28572,
340
456
  ),
341
457
  max: (
342
458
  font-size: carbon--type-scale(8),
@@ -345,10 +461,16 @@ $expressive-paragraph-01: (
345
461
  ),
346
462
  );
347
463
 
464
+ /// @type Map
465
+ /// @access public
466
+ /// @group @carbon/type
467
+ $fluid-paragraph-01: $expressive-paragraph-01 !default;
468
+
348
469
  /// @type Map
349
470
  /// @access public
350
471
  /// @group @carbon/type
351
472
  $quotation-01: (
473
+ font-family: carbon--font-family('serif'),
352
474
  font-size: carbon--type-scale(5),
353
475
  font-weight: carbon--font-weight('regular'),
354
476
  line-height: 1.3,
@@ -359,11 +481,11 @@ $quotation-01: (
359
481
  ),
360
482
  lg: (
361
483
  font-size: carbon--type-scale(6),
362
- line-height: 1.334,
484
+ line-height: 1.33333,
363
485
  ),
364
486
  xlg: (
365
487
  font-size: carbon--type-scale(7),
366
- line-height: 1.29,
488
+ line-height: 1.28572,
367
489
  ),
368
490
  max: (
369
491
  font-size: carbon--type-scale(8),
@@ -372,10 +494,16 @@ $quotation-01: (
372
494
  ),
373
495
  ) !default;
374
496
 
497
+ /// @type Map
498
+ /// @access public
499
+ /// @group @carbon/type
500
+ $fluid-quotation-01: $quotation-01 !default;
501
+
375
502
  /// @type Map
376
503
  /// @access public
377
504
  /// @group @carbon/type
378
505
  $quotation-02: (
506
+ font-family: carbon--font-family('serif'),
379
507
  font-size: carbon--type-scale(8),
380
508
  font-weight: carbon--font-weight('light'),
381
509
  line-height: 1.25,
@@ -399,6 +527,11 @@ $quotation-02: (
399
527
  ),
400
528
  ) !default;
401
529
 
530
+ /// @type Map
531
+ /// @access public
532
+ /// @group @carbon/type
533
+ $fluid-quotation-02: $quotation-02 !default;
534
+
402
535
  /// @type Map
403
536
  /// @access public
404
537
  /// @group @carbon/type
@@ -425,6 +558,11 @@ $display-01: (
425
558
  ),
426
559
  ) !default;
427
560
 
561
+ /// @type Map
562
+ /// @access public
563
+ /// @group @carbon/type
564
+ $fluid-display-01: $display-01 !default;
565
+
428
566
  /// @type Map
429
567
  /// @access public
430
568
  /// @group @carbon/type
@@ -451,6 +589,11 @@ $display-02: (
451
589
  ),
452
590
  ) !default;
453
591
 
592
+ /// @type Map
593
+ /// @access public
594
+ /// @group @carbon/type
595
+ $fluid-display-02: $display-02 !default;
596
+
454
597
  /// @type Map
455
598
  /// @access public
456
599
  /// @group @carbon/type
@@ -482,6 +625,11 @@ $display-03: (
482
625
  ),
483
626
  ) !default;
484
627
 
628
+ /// @type Map
629
+ /// @access public
630
+ /// @group @carbon/type
631
+ $fluid-display-03: $display-03 !default;
632
+
485
633
  /// @type Map
486
634
  /// @access public
487
635
  /// @group @carbon/type
@@ -513,6 +661,11 @@ $display-04: (
513
661
  ),
514
662
  ) !default;
515
663
 
664
+ /// @type Map
665
+ /// @access public
666
+ /// @group @carbon/type
667
+ $fluid-display-04: $display-04 !default;
668
+
516
669
  /// @type Map
517
670
  /// @access public
518
671
  /// @group @carbon/type
@@ -551,6 +704,31 @@ $tokens: (
551
704
  display-02: $display-02,
552
705
  display-03: $display-03,
553
706
  display-04: $display-04,
707
+ // V11 Tokens
708
+ legal-01: $legal-01,
709
+ legal-02: $legal-02,
710
+ body-compact-01: $body-compact-01,
711
+ body-compact-02: $body-compact-02,
712
+ heading-compact-01: $heading-compact-01,
713
+ heading-compact-02: $heading-compact-02,
714
+ body-01: $body-01,
715
+ body-02: $body-02,
716
+ heading-03: $heading-03,
717
+ heading-04: $heading-04,
718
+ heading-05: $heading-05,
719
+ heading-06: $heading-06,
720
+ heading-07: $heading-07,
721
+ fluid-heading-03: $fluid-heading-03,
722
+ fluid-heading-04: $fluid-heading-04,
723
+ fluid-heading-05: $fluid-heading-05,
724
+ fluid-heading-06: $fluid-heading-06,
725
+ fluid-paragraph-01: $fluid-paragraph-01,
726
+ fluid-quotation-01: $fluid-quotation-01,
727
+ fluid-quotation-02: $fluid-quotation-02,
728
+ fluid-display-01: $fluid-display-01,
729
+ fluid-display-02: $fluid-display-02,
730
+ fluid-display-03: $fluid-display-03,
731
+ fluid-display-04: $fluid-display-04,
554
732
  );
555
733
 
556
734
  /// @param {Map} $map
@@ -17,7 +17,7 @@
17
17
  @return 12px;
18
18
  }
19
19
  // Yn = Yn-1 + {INT[(n-2)/4] + 1} * 2
20
- @return get-type-size($step - 1) + (floor(($step - 2) / 4) + 1) * 2;
20
+ @return get-type-size($step - 1) + (floor(($step - 2) * 0.25) + 1) * 2;
21
21
  }
22
22
 
23
23
  /// Type scale follows a custom formula for determining each step size and supports sizes from 12px to 92px