@carbon/layout 10.18.0-rc.0 → 10.18.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/docs/sass.md DELETED
@@ -1,2791 +0,0 @@
1
- # Sass API
2
-
3
- | Mark | Description |
4
- | ---- | ---------------------------------------------------------- |
5
- | ✅ | Public functions, mixins, placeholders, and variables |
6
- | ❌ | Private items - not supported outside package's build |
7
- | ⚠️ | Deprecated items - may not be available in future releases |
8
-
9
- <!-- toc -->
10
-
11
- - [@carbon/layout](#carbonlayout)
12
- - [✅carbon--grid-gutter [variable]](#carbon--grid-gutter-variable)
13
- - [✅grid-gutter [variable]](#grid-gutter-variable)
14
- - [✅carbon--grid-gutter--condensed [variable]](#carbon--grid-gutter--condensed-variable)
15
- - [✅grid-gutter--condensed [variable]](#grid-gutter--condensed-variable)
16
- - [✅carbon--grid-breakpoints [variable]](#carbon--grid-breakpoints-variable)
17
- - [✅grid-breakpoints [variable]](#grid-breakpoints-variable)
18
- - [✅carbon--breakpoint-next [function]](#carbon--breakpoint-next-function)
19
- - [✅breakpoint-next [function]](#breakpoint-next-function)
20
- - [✅carbon--breakpoint-prev [function]](#carbon--breakpoint-prev-function)
21
- - [✅breakpoint-prev [function]](#breakpoint-prev-function)
22
- - [✅carbon--is-smallest-breakpoint [function]](#carbon--is-smallest-breakpoint-function)
23
- - [✅is-smallest-breakpoint [function]](#is-smallest-breakpoint-function)
24
- - [✅carbon--largest-breakpoint-name [function]](#carbon--largest-breakpoint-name-function)
25
- - [✅largest-breakpoint-name [function]](#largest-breakpoint-name-function)
26
- - [✅breakpoint-infix [function]](#breakpoint-infix-function)
27
- - [✅carbon--breakpoint-infix [function]](#carbon--breakpoint-infix-function)
28
- - [✅breakpoint-up [mixin]](#breakpoint-up-mixin)
29
- - [✅carbon--breakpoint-up [mixin]](#carbon--breakpoint-up-mixin)
30
- - [✅breakpoint-down [mixin]](#breakpoint-down-mixin)
31
- - [✅carbon--breakpoint-down [mixin]](#carbon--breakpoint-down-mixin)
32
- - [✅breakpoint-between [mixin]](#breakpoint-between-mixin)
33
- - [✅carbon--breakpoint-between [mixin]](#carbon--breakpoint-between-mixin)
34
- - [✅largest-breakpoint [mixin]](#largest-breakpoint-mixin)
35
- - [✅carbon--largest-breakpoint [mixin]](#carbon--largest-breakpoint-mixin)
36
- - [✅breakpoint [mixin]](#breakpoint-mixin)
37
- - [✅carbon--breakpoint [mixin]](#carbon--breakpoint-mixin)
38
- - [✅carbon--container-01 [variable]](#carbon--container-01-variable)
39
- - [✅carbon--container-02 [variable]](#carbon--container-02-variable)
40
- - [✅carbon--container-03 [variable]](#carbon--container-03-variable)
41
- - [✅carbon--container-04 [variable]](#carbon--container-04-variable)
42
- - [✅carbon--container-05 [variable]](#carbon--container-05-variable)
43
- - [✅carbon--container [variable]](#carbon--container-variable)
44
- - [✅container-01 [variable]](#container-01-variable)
45
- - [✅container-02 [variable]](#container-02-variable)
46
- - [✅container-03 [variable]](#container-03-variable)
47
- - [✅container-04 [variable]](#container-04-variable)
48
- - [✅container-05 [variable]](#container-05-variable)
49
- - [✅carbon--base-font-size [variable]](#carbon--base-font-size-variable)
50
- - [✅base-font-size [variable]](#base-font-size-variable)
51
- - [✅carbon--rem [function]](#carbon--rem-function)
52
- - [✅rem [function]](#rem-function)
53
- - [✅carbon--em [function]](#carbon--em-function)
54
- - [✅em [function]](#em-function)
55
- - [✅carbon--fluid-spacing-01 [variable]](#carbon--fluid-spacing-01-variable)
56
- - [✅fluid-spacing-01 [variable]](#fluid-spacing-01-variable)
57
- - [✅carbon--fluid-spacing-02 [variable]](#carbon--fluid-spacing-02-variable)
58
- - [✅fluid-spacing-02 [variable]](#fluid-spacing-02-variable)
59
- - [✅carbon--fluid-spacing-03 [variable]](#carbon--fluid-spacing-03-variable)
60
- - [✅fluid-spacing-03 [variable]](#fluid-spacing-03-variable)
61
- - [✅carbon--fluid-spacing-04 [variable]](#carbon--fluid-spacing-04-variable)
62
- - [✅fluid-spacing-04 [variable]](#fluid-spacing-04-variable)
63
- - [✅carbon--fluid-spacing [variable]](#carbon--fluid-spacing-variable)
64
- - [✅fluid-spacing [variable]](#fluid-spacing-variable)
65
- - [✅fluid-spacing-01 [variable]](#fluid-spacing-01-variable)
66
- - [✅fluid-spacing-02 [variable]](#fluid-spacing-02-variable)
67
- - [✅fluid-spacing-03 [variable]](#fluid-spacing-03-variable)
68
- - [✅fluid-spacing-04 [variable]](#fluid-spacing-04-variable)
69
- - [✅carbon--icon-size-01 [variable]](#carbon--icon-size-01-variable)
70
- - [✅carbon--icon-size-02 [variable]](#carbon--icon-size-02-variable)
71
- - [✅carbon--icon-size [variable]](#carbon--icon-size-variable)
72
- - [✅icon-size-01 [variable]](#icon-size-01-variable)
73
- - [✅icon-size-02 [variable]](#icon-size-02-variable)
74
- - [✅carbon--get-column-width [function]](#carbon--get-column-width-function)
75
- - [✅carbon--key-height-scales [variable]](#carbon--key-height-scales-variable)
76
- - [✅carbon--key-height [function]](#carbon--key-height-function)
77
- - [✅carbon--layout-01 [variable]](#carbon--layout-01-variable)
78
- - [✅carbon--layout-02 [variable]](#carbon--layout-02-variable)
79
- - [✅carbon--layout-03 [variable]](#carbon--layout-03-variable)
80
- - [✅carbon--layout-04 [variable]](#carbon--layout-04-variable)
81
- - [✅carbon--layout-05 [variable]](#carbon--layout-05-variable)
82
- - [✅carbon--layout-06 [variable]](#carbon--layout-06-variable)
83
- - [✅carbon--layout-07 [variable]](#carbon--layout-07-variable)
84
- - [✅carbon--layout [variable]](#carbon--layout-variable)
85
- - [✅layout-01 [variable]](#layout-01-variable)
86
- - [✅layout-02 [variable]](#layout-02-variable)
87
- - [✅layout-03 [variable]](#layout-03-variable)
88
- - [✅layout-04 [variable]](#layout-04-variable)
89
- - [✅layout-05 [variable]](#layout-05-variable)
90
- - [✅layout-06 [variable]](#layout-06-variable)
91
- - [✅layout-07 [variable]](#layout-07-variable)
92
- - [✅carbon--mini-unit-size [variable]](#carbon--mini-unit-size-variable)
93
- - [✅carbon--mini-units [function]](#carbon--mini-units-function)
94
- - [✅carbon--spacing-01 [variable]](#carbon--spacing-01-variable)
95
- - [✅spacing-01 [variable]](#spacing-01-variable)
96
- - [✅carbon--spacing-02 [variable]](#carbon--spacing-02-variable)
97
- - [✅spacing-02 [variable]](#spacing-02-variable)
98
- - [✅carbon--spacing-03 [variable]](#carbon--spacing-03-variable)
99
- - [✅spacing-03 [variable]](#spacing-03-variable)
100
- - [✅carbon--spacing-04 [variable]](#carbon--spacing-04-variable)
101
- - [✅spacing-04 [variable]](#spacing-04-variable)
102
- - [✅carbon--spacing-05 [variable]](#carbon--spacing-05-variable)
103
- - [✅spacing-05 [variable]](#spacing-05-variable)
104
- - [✅carbon--spacing-06 [variable]](#carbon--spacing-06-variable)
105
- - [✅spacing-06 [variable]](#spacing-06-variable)
106
- - [✅carbon--spacing-07 [variable]](#carbon--spacing-07-variable)
107
- - [✅spacing-07 [variable]](#spacing-07-variable)
108
- - [✅carbon--spacing-08 [variable]](#carbon--spacing-08-variable)
109
- - [✅spacing-08 [variable]](#spacing-08-variable)
110
- - [✅carbon--spacing-09 [variable]](#carbon--spacing-09-variable)
111
- - [✅spacing-09 [variable]](#spacing-09-variable)
112
- - [✅carbon--spacing-10 [variable]](#carbon--spacing-10-variable)
113
- - [✅spacing-10 [variable]](#spacing-10-variable)
114
- - [✅carbon--spacing-11 [variable]](#carbon--spacing-11-variable)
115
- - [✅spacing-11 [variable]](#spacing-11-variable)
116
- - [✅carbon--spacing-12 [variable]](#carbon--spacing-12-variable)
117
- - [✅spacing-12 [variable]](#spacing-12-variable)
118
- - [✅carbon--spacing [variable]](#carbon--spacing-variable)
119
- - [✅spacing [variable]](#spacing-variable)
120
- - [✅spacing-01 [variable]](#spacing-01-variable)
121
- - [✅spacing-02 [variable]](#spacing-02-variable)
122
- - [✅spacing-03 [variable]](#spacing-03-variable)
123
- - [✅spacing-04 [variable]](#spacing-04-variable)
124
- - [✅spacing-05 [variable]](#spacing-05-variable)
125
- - [✅spacing-06 [variable]](#spacing-06-variable)
126
- - [✅spacing-07 [variable]](#spacing-07-variable)
127
- - [✅spacing-08 [variable]](#spacing-08-variable)
128
- - [✅spacing-09 [variable]](#spacing-09-variable)
129
- - [✅spacing-10 [variable]](#spacing-10-variable)
130
- - [✅spacing-11 [variable]](#spacing-11-variable)
131
- - [✅spacing-12 [variable]](#spacing-12-variable)
132
- - [✅map-deep-get [function]](#map-deep-get-function)
133
- - [✅map-deep-get [function]](#map-deep-get-function)
134
- - [✅carbon--key-by-index [function]](#carbon--key-by-index-function)
135
- - [✅key-by-index [function]](#key-by-index-function)
136
- - [✅last-map-item [function]](#last-map-item-function)
137
- - [✅last-map-item [function]](#last-map-item-function)
138
-
139
- <!-- tocstop -->
140
-
141
- ## @carbon/layout
142
-
143
- ### ✅carbon--grid-gutter [variable]
144
-
145
- Carbon gutter size in rem
146
-
147
- <details>
148
- <summary>Source code</summary>
149
-
150
- ```scss
151
- $carbon--grid-gutter: carbon--rem(32px);
152
- ```
153
-
154
- </details>
155
-
156
- - **Group**: [@carbon/layout](#carbonlayout)
157
- - **Type**: `Number`
158
-
159
- ### ✅grid-gutter [variable]
160
-
161
- Carbon gutter size in rem
162
-
163
- <details>
164
- <summary>Source code</summary>
165
-
166
- ```scss
167
- $grid-gutter: convert.rem(32px);
168
- ```
169
-
170
- </details>
171
-
172
- - **Group**: [@carbon/layout](#carbonlayout)
173
- - **Type**: `Number`
174
-
175
- ### ✅carbon--grid-gutter--condensed [variable]
176
-
177
- Carbon condensed gutter size in rem
178
-
179
- <details>
180
- <summary>Source code</summary>
181
-
182
- ```scss
183
- $carbon--grid-gutter--condensed: carbon--rem(1px);
184
- ```
185
-
186
- </details>
187
-
188
- - **Group**: [@carbon/layout](#carbonlayout)
189
- - **Type**: `Number`
190
-
191
- ### ✅grid-gutter--condensed [variable]
192
-
193
- Carbon condensed gutter size in rem
194
-
195
- <details>
196
- <summary>Source code</summary>
197
-
198
- ```scss
199
- $grid-gutter--condensed: convert.rem(1px);
200
- ```
201
-
202
- </details>
203
-
204
- - **Group**: [@carbon/layout](#carbonlayout)
205
- - **Type**: `Number`
206
-
207
- ### ✅carbon--grid-breakpoints [variable]
208
-
209
- <details>
210
- <summary>Source code</summary>
211
-
212
- ```scss
213
- $carbon--grid-breakpoints: (
214
- sm: (
215
- columns: 4,
216
- margin: 0,
217
- width: carbon--rem(320px),
218
- ),
219
- md: (
220
- columns: 8,
221
- margin: carbon--rem(16px),
222
- width: carbon--rem(672px),
223
- ),
224
- lg: (
225
- columns: 16,
226
- margin: carbon--rem(16px),
227
- width: carbon--rem(1056px),
228
- ),
229
- xlg: (
230
- columns: 16,
231
- margin: carbon--rem(16px),
232
- width: carbon--rem(1312px),
233
- ),
234
- max: (
235
- columns: 16,
236
- margin: carbon--rem(24px),
237
- width: carbon--rem(1584px),
238
- ),
239
- );
240
- ```
241
-
242
- </details>
243
-
244
- - **Group**: [@carbon/layout](#carbonlayout)
245
- - **Type**: `Map`
246
-
247
- ### ✅grid-breakpoints [variable]
248
-
249
- <details>
250
- <summary>Source code</summary>
251
-
252
- ```scss
253
- $grid-breakpoints: (
254
- sm: (
255
- columns: 4,
256
- margin: 0,
257
- width: convert.rem(320px),
258
- ),
259
- md: (
260
- columns: 8,
261
- margin: convert.rem(16px),
262
- width: convert.rem(672px),
263
- ),
264
- lg: (
265
- columns: 16,
266
- margin: convert.rem(16px),
267
- width: convert.rem(1056px),
268
- ),
269
- xlg: (
270
- columns: 16,
271
- margin: convert.rem(16px),
272
- width: convert.rem(1312px),
273
- ),
274
- max: (
275
- columns: 16,
276
- margin: convert.rem(24px),
277
- width: convert.rem(1584px),
278
- ),
279
- );
280
- ```
281
-
282
- </details>
283
-
284
- - **Group**: [@carbon/layout](#carbonlayout)
285
- - **Type**: `Map`
286
-
287
- ### ✅carbon--breakpoint-next [function]
288
-
289
- Get the value of the next breakpoint, or null for the last breakpoint
290
-
291
- <details>
292
- <summary>Source code</summary>
293
-
294
- ```scss
295
- @function carbon--breakpoint-next(
296
- $name,
297
- $breakpoints: $carbon--grid-breakpoints,
298
- $breakpoint-names: map-keys($breakpoints)
299
- ) {
300
- $n: index($breakpoint-names, $name);
301
- @if $n != null and $n < length($breakpoint-names) {
302
- @return nth($breakpoint-names, $n + 1);
303
- }
304
- @return null;
305
- }
306
- ```
307
-
308
- </details>
309
-
310
- - **Parameters**:
311
-
312
- | Name | Description | Type | Default value |
313
- | ------------------- | --------------------------------------------------------------------------------------------------------------- | -------- | --------------------------- |
314
- | `$name` | The name of the brekapoint | `String` | — |
315
- | `$breakpoints` | A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint | `Map` | `$carbon--grid-breakpoints` |
316
- | `$breakpoint-names` | A list of names from the `$breakpoints` map | `List` | `map-keys($breakpoints)` |
317
-
318
- - **Group**: [@carbon/layout](#carbonlayout)
319
- - **Returns**: `String`
320
-
321
- ### ✅breakpoint-next [function]
322
-
323
- Get the value of the next breakpoint, or null for the last breakpoint
324
-
325
- <details>
326
- <summary>Source code</summary>
327
-
328
- ```scss
329
- @function breakpoint-next(
330
- $name,
331
- $breakpoints: $grid-breakpoints,
332
- $breakpoint-names: map-keys($breakpoints)
333
- ) {
334
- $n: list.index($breakpoint-names, $name);
335
- @if $n != null and $n < list.length($breakpoint-names) {
336
- @return list.nth($breakpoint-names, $n + 1);
337
- }
338
- @return null;
339
- }
340
- ```
341
-
342
- </details>
343
-
344
- - **Parameters**:
345
-
346
- | Name | Description | Type | Default value |
347
- | ------------------- | --------------------------------------------------------------------------------------------------------------- | -------- | ------------------------ |
348
- | `$name` | The name of the brekapoint | `String` | — |
349
- | `$breakpoints` | A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint | `Map` | `$grid-breakpoints` |
350
- | `$breakpoint-names` | A list of names from the `$breakpoints` map | `List` | `map-keys($breakpoints)` |
351
-
352
- - **Group**: [@carbon/layout](#carbonlayout)
353
- - **Returns**: `String`
354
-
355
- ### ✅carbon--breakpoint-prev [function]
356
-
357
- Get the value of the previous breakpoint, or null for the first breakpoint
358
-
359
- <details>
360
- <summary>Source code</summary>
361
-
362
- ```scss
363
- @function carbon--breakpoint-prev(
364
- $name,
365
- $breakpoints: $carbon--grid-breakpoints,
366
- $breakpoint-names: map-keys($breakpoints)
367
- ) {
368
- $n: index($breakpoint-names, $name);
369
- @if $n != null and $n > 1 {
370
- @return nth($breakpoint-names, $n - 1);
371
- }
372
- @return null;
373
- }
374
- ```
375
-
376
- </details>
377
-
378
- - **Parameters**:
379
-
380
- | Name | Description | Type | Default value |
381
- | ------------------- | --------------------------------------------------------------------------------------------------------------- | -------- | --------------------------- |
382
- | `$name` | The name of the brekapoint | `String` | — |
383
- | `$breakpoints` | A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint | `Map` | `$carbon--grid-breakpoints` |
384
- | `$breakpoint-names` | A list of names from the `$breakpoints` map | `List` | `map-keys($breakpoints)` |
385
-
386
- - **Group**: [@carbon/layout](#carbonlayout)
387
- - **Returns**: `String`
388
-
389
- ### ✅breakpoint-prev [function]
390
-
391
- Get the value of the previous breakpoint, or null for the first breakpoint
392
-
393
- <details>
394
- <summary>Source code</summary>
395
-
396
- ```scss
397
- @function breakpoint-prev(
398
- $name,
399
- $breakpoints: $grid-breakpoints,
400
- $breakpoint-names: map-keys($breakpoints)
401
- ) {
402
- $n: list.index($breakpoint-names, $name);
403
- @if $n != null and $n > 1 {
404
- @return list.nth($breakpoint-names, $n - 1);
405
- }
406
- @return null;
407
- }
408
- ```
409
-
410
- </details>
411
-
412
- - **Parameters**:
413
-
414
- | Name | Description | Type | Default value |
415
- | ------------------- | --------------------------------------------------------------------------------------------------------------- | -------- | ------------------------ |
416
- | `$name` | The name of the brekapoint | `String` | — |
417
- | `$breakpoints` | A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint | `Map` | `$grid-breakpoints` |
418
- | `$breakpoint-names` | A list of names from the `$breakpoints` map | `List` | `map-keys($breakpoints)` |
419
-
420
- - **Group**: [@carbon/layout](#carbonlayout)
421
- - **Returns**: `String`
422
-
423
- ### ✅carbon--is-smallest-breakpoint [function]
424
-
425
- Check to see if the given breakpoint name
426
-
427
- <details>
428
- <summary>Source code</summary>
429
-
430
- ```scss
431
- @function carbon--is-smallest-breakpoint(
432
- $name,
433
- $breakpoints: $carbon--grid-breakpoints
434
- ) {
435
- @return index(map-keys($breakpoints), $name) == 1;
436
- }
437
- ```
438
-
439
- </details>
440
-
441
- - **Parameters**:
442
-
443
- | Name | Description | Type | Default value |
444
- | -------------- | --------------------------------------------------------------------------------------------------------------- | -------- | --------------------------- |
445
- | `$name` | The name of the brekapoint | `String` | — |
446
- | `$breakpoints` | A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint | `Map` | `$carbon--grid-breakpoints` |
447
-
448
- - **Group**: [@carbon/layout](#carbonlayout)
449
- - **Returns**: `Bool`
450
- - **Used by**:
451
- - [carbon--breakpoint-up [mixin]](#carbon--breakpoint-up-mixin)
452
-
453
- ### ✅is-smallest-breakpoint [function]
454
-
455
- Check to see if the given breakpoint name
456
-
457
- <details>
458
- <summary>Source code</summary>
459
-
460
- ```scss
461
- @function is-smallest-breakpoint($name, $breakpoints: $grid-breakpoints) {
462
- @return list.index(map.keys($breakpoints), $name) == 1;
463
- }
464
- ```
465
-
466
- </details>
467
-
468
- - **Parameters**:
469
-
470
- | Name | Description | Type | Default value |
471
- | -------------- | --------------------------------------------------------------------------------------------------------------- | -------- | ------------------- |
472
- | `$name` | The name of the brekapoint | `String` | — |
473
- | `$breakpoints` | A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint | `Map` | `$grid-breakpoints` |
474
-
475
- - **Group**: [@carbon/layout](#carbonlayout)
476
- - **Returns**: `Bool`
477
- - **Used by**:
478
- - [breakpoint-up [mixin]](#breakpoint-up-mixin)
479
-
480
- ### ✅carbon--largest-breakpoint-name [function]
481
-
482
- Returns the largest breakpoint name
483
-
484
- <details>
485
- <summary>Source code</summary>
486
-
487
- ```scss
488
- @function carbon--largest-breakpoint-name(
489
- $breakpoints: $carbon--grid-breakpoints
490
- ) {
491
- $total-breakpoints: length($breakpoints);
492
- @return carbon--key-by-index($breakpoints, $total-breakpoints);
493
- }
494
- ```
495
-
496
- </details>
497
-
498
- - **Parameters**:
499
-
500
- | Name | Description | Type | Default value |
501
- | -------------- | ---------------------------------------------- | ----- | --------------------------- |
502
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$carbon--grid-breakpoints` |
503
-
504
- - **Group**: [@carbon/layout](#carbonlayout)
505
- - **Returns**: `String`
506
- - **Requires**:
507
- - [carbon--key-by-index [function]](#carbon--key-by-index-function)
508
- - **Used by**:
509
- - [carbon--largest-breakpoint [mixin]](#carbon--largest-breakpoint-mixin)
510
-
511
- ### ✅largest-breakpoint-name [function]
512
-
513
- Returns the largest breakpoint name
514
-
515
- <details>
516
- <summary>Source code</summary>
517
-
518
- ```scss
519
- @function largest-breakpoint-name($breakpoints: $grid-breakpoints) {
520
- $total-breakpoints: list.length($breakpoints);
521
- @return key-by-index($breakpoints, $total-breakpoints);
522
- }
523
- ```
524
-
525
- </details>
526
-
527
- - **Parameters**:
528
-
529
- | Name | Description | Type | Default value |
530
- | -------------- | ---------------------------------------------- | ----- | ------------------- |
531
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$grid-breakpoints` |
532
-
533
- - **Group**: [@carbon/layout](#carbonlayout)
534
- - **Returns**: `String`
535
- - **Requires**:
536
- - [key-by-index [function]](#key-by-index-function)
537
- - **Used by**:
538
- - [largest-breakpoint [mixin]](#largest-breakpoint-mixin)
539
-
540
- ### ✅breakpoint-infix [function]
541
-
542
- Get the infix for a given breakpoint in a list of breakpoints. Usesful for
543
- generate the size part in a selector, for example: `.prefix--col-sm-2`.
544
-
545
- <details>
546
- <summary>Source code</summary>
547
-
548
- ```scss
549
- @function breakpoint-infix($name) {
550
- @return '-#{$name}';
551
- }
552
- ```
553
-
554
- </details>
555
-
556
- - **Parameters**:
557
-
558
- | Name | Description | Type | Default value |
559
- | ------- | -------------------------- | -------- | ------------- |
560
- | `$name` | The name of the breakpoint | `String` | — |
561
-
562
- - **Group**: [@carbon/layout](#carbonlayout)
563
- - **Returns**: `String`
564
-
565
- ### ✅carbon--breakpoint-infix [function]
566
-
567
- Get the infix for a given breakpoint in a list of breakpoints. Usesful for
568
- generate the size part in a selector, for example: `.prefix--col-sm-2`.
569
-
570
- <details>
571
- <summary>Source code</summary>
572
-
573
- ```scss
574
- @function carbon--breakpoint-infix($name) {
575
- @return '-#{$name}';
576
- }
577
- ```
578
-
579
- </details>
580
-
581
- - **Parameters**:
582
-
583
- | Name | Description | Type | Default value |
584
- | ------- | -------------------------- | -------- | ------------- |
585
- | `$name` | The name of the breakpoint | `String` | — |
586
-
587
- - **Group**: [@carbon/layout](#carbonlayout)
588
- - **Returns**: `String`
589
-
590
- ### ✅breakpoint-up [mixin]
591
-
592
- Generate a media query from the width of the given breakpoint to infinity
593
-
594
- <details>
595
- <summary>Source code</summary>
596
-
597
- ```scss
598
- @mixin breakpoint-up($name, $breakpoints: $grid-breakpoints) {
599
- @if meta.type-of($name) == 'number' {
600
- @media (min-width: $name) {
601
- @content;
602
- }
603
- } @else if map.has-key($breakpoints, $name) {
604
- $breakpoint: map.get($breakpoints, $name);
605
- $width: map.get($breakpoint, width);
606
- @if is-smallest-breakpoint($name, $breakpoints) {
607
- @content;
608
- } @else {
609
- @media (min-width: $width) {
610
- @content;
611
- }
612
- }
613
- } @else {
614
- @error 'Unable to find a breakpoint with name `#{$name}`. Expected one of: (#{map.keys($breakpoints)})';
615
- }
616
- }
617
- ```
618
-
619
- </details>
620
-
621
- - **Parameters**:
622
-
623
- | Name | Description | Type | Default value |
624
- | -------------- | ---------------------------------------------- | ------------------ | ------------------- |
625
- | `$name` | — | `String \| Number` | — |
626
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$grid-breakpoints` |
627
-
628
- - **Group**: [@carbon/layout](#carbonlayout)
629
- - **Requires**:
630
- - [is-smallest-breakpoint [function]](#is-smallest-breakpoint-function)
631
- - **Used by**:
632
- - [breakpoint-between [mixin]](#breakpoint-between-mixin)
633
- - [breakpoint [mixin]](#breakpoint-mixin)
634
-
635
- ### ✅carbon--breakpoint-up [mixin]
636
-
637
- Generate a media query from the width of the given breakpoint to infinity
638
-
639
- <details>
640
- <summary>Source code</summary>
641
-
642
- ```scss
643
- @mixin carbon--breakpoint-up($name, $breakpoints: $carbon--grid-breakpoints) {
644
- @if type-of($name) == 'number' {
645
- @media (min-width: $name) {
646
- @content;
647
- }
648
- } @else if map-has-key($breakpoints, $name) {
649
- $breakpoint: map-get($breakpoints, $name);
650
- $width: map-get($breakpoint, width);
651
- @if carbon--is-smallest-breakpoint($name, $breakpoints) {
652
- @content;
653
- } @else {
654
- @media (min-width: $width) {
655
- @content;
656
- }
657
- }
658
- } @else {
659
- @error 'Unable to find a breakpoint with name `#{$name}`. Expected one of: (#{map-keys($breakpoints)})';
660
- }
661
- }
662
- ```
663
-
664
- </details>
665
-
666
- - **Parameters**:
667
-
668
- | Name | Description | Type | Default value |
669
- | -------------- | ---------------------------------------------- | ------------------ | --------------------------- |
670
- | `$name` | — | `String \| Number` | — |
671
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$carbon--grid-breakpoints` |
672
-
673
- - **Group**: [@carbon/layout](#carbonlayout)
674
- - **Requires**:
675
- - [carbon--is-smallest-breakpoint [function]](#carbon--is-smallest-breakpoint-function)
676
- - **Used by**:
677
- - [carbon--breakpoint-between [mixin]](#carbon--breakpoint-between-mixin)
678
- - [carbon--breakpoint [mixin]](#carbon--breakpoint-mixin)
679
-
680
- ### ✅breakpoint-down [mixin]
681
-
682
- Generate a media query for the maximum width of the given styles
683
-
684
- <details>
685
- <summary>Source code</summary>
686
-
687
- ```scss
688
- @mixin breakpoint-down($name, $breakpoints: $grid-breakpoints) {
689
- @if meta.type-of($name) == 'number' {
690
- @media (max-width: $name) {
691
- @content;
692
- }
693
- } @else if map.has-key($breakpoints, $name) {
694
- // We borrow this logic from bootstrap for specifying the value of the
695
- // max-width. The maximum width is calculated by finding the breakpoint and
696
- // subtracting .02 from its value. This value is used instead of .01 to
697
- // avoid rounding issues in Safari
698
- // https://github.com/twbs/bootstrap/blob/c5b1919deaf5393fcca9e9b9d7ce9c338160d99d/scss/mixins/_breakpoints.scss#L34-L46
699
- $breakpoint: map.get($breakpoints, $name);
700
- $width: map.get($breakpoint, width) - 0.02;
701
- @media (max-width: $width) {
702
- @content;
703
- }
704
- } @else {
705
- @error 'Unable to find a breakpoint with name `#{$name}`. Expected one of: (#{map.keys($breakpoints)})';
706
- }
707
- }
708
- ```
709
-
710
- </details>
711
-
712
- - **Parameters**:
713
-
714
- | Name | Description | Type | Default value |
715
- | -------------- | ---------------------------------------------- | ------------------ | ------------------- |
716
- | `$name` | — | `String \| Number` | — |
717
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$grid-breakpoints` |
718
-
719
- - **Group**: [@carbon/layout](#carbonlayout)
720
- - **Used by**:
721
- - [breakpoint-between [mixin]](#breakpoint-between-mixin)
722
-
723
- ### ✅carbon--breakpoint-down [mixin]
724
-
725
- Generate a media query for the maximum width of the given styles
726
-
727
- <details>
728
- <summary>Source code</summary>
729
-
730
- ```scss
731
- @mixin carbon--breakpoint-down($name, $breakpoints: $carbon--grid-breakpoints) {
732
- @if type-of($name) == 'number' {
733
- @media (max-width: $name) {
734
- @content;
735
- }
736
- } @else if map-has-key($breakpoints, $name) {
737
- // We borrow this logic from bootstrap for specifying the value of the
738
- // max-width. The maximum width is calculated by finding the breakpoint and
739
- // subtracting .02 from its value. This value is used instead of .01 to
740
- // avoid rounding issues in Safari
741
- // https://github.com/twbs/bootstrap/blob/c5b1919deaf5393fcca9e9b9d7ce9c338160d99d/scss/mixins/_breakpoints.scss#L34-L46
742
- $breakpoint: map-get($breakpoints, $name);
743
- $width: map-get($breakpoint, width) - 0.02;
744
- @media (max-width: $width) {
745
- @content;
746
- }
747
- } @else {
748
- @error 'Unable to find a breakpoint with name `#{$name}`. Expected one of: (#{map-keys($breakpoints)})';
749
- }
750
- }
751
- ```
752
-
753
- </details>
754
-
755
- - **Parameters**:
756
-
757
- | Name | Description | Type | Default value |
758
- | -------------- | ---------------------------------------------- | ------------------ | --------------------------- |
759
- | `$name` | — | `String \| Number` | — |
760
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$carbon--grid-breakpoints` |
761
-
762
- - **Group**: [@carbon/layout](#carbonlayout)
763
- - **Used by**:
764
- - [carbon--breakpoint-between [mixin]](#carbon--breakpoint-between-mixin)
765
-
766
- ### ✅breakpoint-between [mixin]
767
-
768
- Generate a media query for the range between the lower and upper breakpoints
769
-
770
- <details>
771
- <summary>Source code</summary>
772
-
773
- ```scss
774
- @mixin breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
775
- $is-number-lower: meta.type-of($lower) == 'number';
776
- $is-number-upper: meta.type-of($upper) == 'number';
777
- $min: if($is-number-lower, $lower, map.get($breakpoints, $lower));
778
- $max: if($is-number-upper, $upper, map.get($breakpoints, $upper));
779
-
780
- @if $min and $max {
781
- $min-width: if(not $is-number-lower and $min, map.get($min, width), $min);
782
- $max-width: if(not $is-number-upper and $max, map.get($max, width), $max);
783
- @media (min-width: $min-width) and (max-width: $max-width) {
784
- @content;
785
- }
786
- } @else if $min != null and $max == null {
787
- @include breakpoint-up($lower) {
788
- @content;
789
- }
790
- } @else if $min == null and $max != null {
791
- @include breakpoint-down($upper) {
792
- @content;
793
- }
794
- } @else {
795
- @error 'Unable to find a breakpoint to satisfy: (#{$lower},#{$upper}). Expected both to be one of (#{map.keys($breakpoints)}).';
796
- }
797
- }
798
- ```
799
-
800
- </details>
801
-
802
- - **Parameters**:
803
-
804
- | Name | Description | Type | Default value |
805
- | -------------- | ---------------------------------------------- | ------------------ | ------------------- |
806
- | `$lower` | — | `String \| Number` | — |
807
- | `$upper` | — | `String \| Number` | — |
808
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$grid-breakpoints` |
809
-
810
- - **Group**: [@carbon/layout](#carbonlayout)
811
- - **Requires**:
812
- - [breakpoint-up [mixin]](#breakpoint-up-mixin)
813
- - [breakpoint-down [mixin]](#breakpoint-down-mixin)
814
-
815
- ### ✅carbon--breakpoint-between [mixin]
816
-
817
- Generate a media query for the range between the lower and upper breakpoints
818
-
819
- <details>
820
- <summary>Source code</summary>
821
-
822
- ```scss
823
- @mixin carbon--breakpoint-between(
824
- $lower,
825
- $upper,
826
- $breakpoints: $carbon--grid-breakpoints
827
- ) {
828
- $is-number-lower: type-of($lower) == 'number';
829
- $is-number-upper: type-of($upper) == 'number';
830
- $min: if($is-number-lower, $lower, map-get($breakpoints, $lower));
831
- $max: if($is-number-upper, $upper, map-get($breakpoints, $upper));
832
-
833
- @if $min and $max {
834
- $min-width: if(not $is-number-lower and $min, map-get($min, width), $min);
835
- $max-width: if(not $is-number-upper and $max, map-get($max, width), $max);
836
- @media (min-width: $min-width) and (max-width: $max-width) {
837
- @content;
838
- }
839
- } @else if $min != null and $max == null {
840
- @include carbon--breakpoint-up($lower) {
841
- @content;
842
- }
843
- } @else if $min == null and $max != null {
844
- @include carbon--breakpoint-down($upper) {
845
- @content;
846
- }
847
- } @else {
848
- @error 'Unable to find a breakpoint to satisfy: (#{$lower},#{$upper}). Expected both to be one of (#{map-keys($breakpoints)}).';
849
- }
850
- }
851
- ```
852
-
853
- </details>
854
-
855
- - **Parameters**:
856
-
857
- | Name | Description | Type | Default value |
858
- | -------------- | ---------------------------------------------- | ------------------ | --------------------------- |
859
- | `$lower` | — | `String \| Number` | — |
860
- | `$upper` | — | `String \| Number` | — |
861
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$carbon--grid-breakpoints` |
862
-
863
- - **Group**: [@carbon/layout](#carbonlayout)
864
- - **Requires**:
865
- - [carbon--breakpoint-up [mixin]](#carbon--breakpoint-up-mixin)
866
- - [carbon--breakpoint-down [mixin]](#carbon--breakpoint-down-mixin)
867
-
868
- ### ✅largest-breakpoint [mixin]
869
-
870
- Generate media query for the largest breakpoint
871
-
872
- <details>
873
- <summary>Source code</summary>
874
-
875
- ```scss
876
- @mixin largest-breakpoint($breakpoints: $grid-breakpoints) {
877
- @include breakpoint(largest-breakpoint-name()) {
878
- @content;
879
- }
880
- }
881
- ```
882
-
883
- </details>
884
-
885
- - **Parameters**:
886
-
887
- | Name | Description | Type | Default value |
888
- | -------------- | ---------------------------------------------- | ----- | ------------------- |
889
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$grid-breakpoints` |
890
-
891
- - **Group**: [@carbon/layout](#carbonlayout)
892
- - **Requires**:
893
- - [breakpoint [mixin]](#breakpoint-mixin)
894
- - [largest-breakpoint-name [function]](#largest-breakpoint-name-function)
895
-
896
- ### ✅carbon--largest-breakpoint [mixin]
897
-
898
- Generate media query for the largest breakpoint
899
-
900
- <details>
901
- <summary>Source code</summary>
902
-
903
- ```scss
904
- @mixin carbon--largest-breakpoint($breakpoints: $carbon--grid-breakpoints) {
905
- @include carbon--breakpoint(carbon--largest-breakpoint-name()) {
906
- @content;
907
- }
908
- }
909
- ```
910
-
911
- </details>
912
-
913
- - **Parameters**:
914
-
915
- | Name | Description | Type | Default value |
916
- | -------------- | ---------------------------------------------- | ----- | --------------------------- |
917
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$carbon--grid-breakpoints` |
918
-
919
- - **Group**: [@carbon/layout](#carbonlayout)
920
- - **Requires**:
921
- - [carbon--breakpoint [mixin]](#carbon--breakpoint-mixin)
922
- - [carbon--largest-breakpoint-name [function]](#carbon--largest-breakpoint-name-function)
923
-
924
- ### ✅breakpoint [mixin]
925
-
926
- Generate a media query for a given breakpoint
927
-
928
- <details>
929
- <summary>Source code</summary>
930
-
931
- ```scss
932
- @mixin breakpoint($name, $breakpoints: $grid-breakpoints) {
933
- @include breakpoint-up($name, $breakpoints) {
934
- @content;
935
- }
936
- }
937
- ```
938
-
939
- </details>
940
-
941
- - **Parameters**:
942
-
943
- | Name | Description | Type | Default value |
944
- | -------------- | ---------------------------------------------- | ------------------ | ------------------- |
945
- | `$name` | — | `String \| Number` | — |
946
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$grid-breakpoints` |
947
-
948
- - **Group**: [@carbon/layout](#carbonlayout)
949
- - **Requires**:
950
- - [breakpoint-up [mixin]](#breakpoint-up-mixin)
951
- - **Used by**:
952
- - [largest-breakpoint [mixin]](#largest-breakpoint-mixin)
953
-
954
- ### ✅carbon--breakpoint [mixin]
955
-
956
- Generate a media query for a given breakpoint
957
-
958
- <details>
959
- <summary>Source code</summary>
960
-
961
- ```scss
962
- @mixin carbon--breakpoint($name, $breakpoints: $carbon--grid-breakpoints) {
963
- @include carbon--breakpoint-up($name, $breakpoints) {
964
- @content;
965
- }
966
- }
967
- ```
968
-
969
- </details>
970
-
971
- - **Parameters**:
972
-
973
- | Name | Description | Type | Default value |
974
- | -------------- | ---------------------------------------------- | ------------------ | --------------------------- |
975
- | `$name` | — | `String \| Number` | — |
976
- | `$breakpoints` | A map of breakpoints where the key is the name | `Map` | `$carbon--grid-breakpoints` |
977
-
978
- - **Group**: [@carbon/layout](#carbonlayout)
979
- - **Requires**:
980
- - [carbon--breakpoint-up [mixin]](#carbon--breakpoint-up-mixin)
981
- - **Used by**:
982
- - [carbon--largest-breakpoint [mixin]](#carbon--largest-breakpoint-mixin)
983
-
984
- ### ✅carbon--container-01 [variable]
985
-
986
- <details>
987
- <summary>Source code</summary>
988
-
989
- ```scss
990
- $carbon--container-01: 1.5rem;
991
- ```
992
-
993
- </details>
994
-
995
- - **Group**: [@carbon/layout](#carbonlayout)
996
- - **Type**: `Number`
997
- - **Aliased**:
998
- - `container-01`
999
-
1000
- ### ✅carbon--container-02 [variable]
1001
-
1002
- <details>
1003
- <summary>Source code</summary>
1004
-
1005
- ```scss
1006
- $carbon--container-02: 2rem;
1007
- ```
1008
-
1009
- </details>
1010
-
1011
- - **Group**: [@carbon/layout](#carbonlayout)
1012
- - **Type**: `Number`
1013
- - **Aliased**:
1014
- - `container-02`
1015
-
1016
- ### ✅carbon--container-03 [variable]
1017
-
1018
- <details>
1019
- <summary>Source code</summary>
1020
-
1021
- ```scss
1022
- $carbon--container-03: 2.5rem;
1023
- ```
1024
-
1025
- </details>
1026
-
1027
- - **Group**: [@carbon/layout](#carbonlayout)
1028
- - **Type**: `Number`
1029
- - **Aliased**:
1030
- - `container-03`
1031
-
1032
- ### ✅carbon--container-04 [variable]
1033
-
1034
- <details>
1035
- <summary>Source code</summary>
1036
-
1037
- ```scss
1038
- $carbon--container-04: 3rem;
1039
- ```
1040
-
1041
- </details>
1042
-
1043
- - **Group**: [@carbon/layout](#carbonlayout)
1044
- - **Type**: `Number`
1045
- - **Aliased**:
1046
- - `container-04`
1047
-
1048
- ### ✅carbon--container-05 [variable]
1049
-
1050
- <details>
1051
- <summary>Source code</summary>
1052
-
1053
- ```scss
1054
- $carbon--container-05: 4rem;
1055
- ```
1056
-
1057
- </details>
1058
-
1059
- - **Group**: [@carbon/layout](#carbonlayout)
1060
- - **Type**: `Number`
1061
- - **Aliased**:
1062
- - `container-05`
1063
-
1064
- ### ✅carbon--container [variable]
1065
-
1066
- <details>
1067
- <summary>Source code</summary>
1068
-
1069
- ```scss
1070
- $carbon--container: (
1071
- $carbon--container-01,
1072
- $carbon--container-02,
1073
- $carbon--container-03,
1074
- $carbon--container-04,
1075
- $carbon--container-05
1076
- );
1077
- ```
1078
-
1079
- </details>
1080
-
1081
- - **Group**: [@carbon/layout](#carbonlayout)
1082
- - **Type**: `List`
1083
-
1084
- ### ✅container-01 [variable]
1085
-
1086
- <details>
1087
- <summary>Source code</summary>
1088
-
1089
- ```scss
1090
- $container-01: $carbon--container-01;
1091
- ```
1092
-
1093
- </details>
1094
-
1095
- - **Group**: [@carbon/layout](#carbonlayout)
1096
- - **Type**: `Number`
1097
- - **Alias**: `carbon--container-01`
1098
-
1099
- ### ✅container-02 [variable]
1100
-
1101
- <details>
1102
- <summary>Source code</summary>
1103
-
1104
- ```scss
1105
- $container-02: $carbon--container-02;
1106
- ```
1107
-
1108
- </details>
1109
-
1110
- - **Group**: [@carbon/layout](#carbonlayout)
1111
- - **Type**: `Number`
1112
- - **Alias**: `carbon--container-02`
1113
-
1114
- ### ✅container-03 [variable]
1115
-
1116
- <details>
1117
- <summary>Source code</summary>
1118
-
1119
- ```scss
1120
- $container-03: $carbon--container-03;
1121
- ```
1122
-
1123
- </details>
1124
-
1125
- - **Group**: [@carbon/layout](#carbonlayout)
1126
- - **Type**: `Number`
1127
- - **Alias**: `carbon--container-03`
1128
-
1129
- ### ✅container-04 [variable]
1130
-
1131
- <details>
1132
- <summary>Source code</summary>
1133
-
1134
- ```scss
1135
- $container-04: $carbon--container-04;
1136
- ```
1137
-
1138
- </details>
1139
-
1140
- - **Group**: [@carbon/layout](#carbonlayout)
1141
- - **Type**: `Number`
1142
- - **Alias**: `carbon--container-04`
1143
-
1144
- ### ✅container-05 [variable]
1145
-
1146
- <details>
1147
- <summary>Source code</summary>
1148
-
1149
- ```scss
1150
- $container-05: $carbon--container-05;
1151
- ```
1152
-
1153
- </details>
1154
-
1155
- - **Group**: [@carbon/layout](#carbonlayout)
1156
- - **Type**: `Number`
1157
- - **Alias**: `carbon--container-05`
1158
-
1159
- ### ✅carbon--base-font-size [variable]
1160
-
1161
- Default font size
1162
-
1163
- <details>
1164
- <summary>Source code</summary>
1165
-
1166
- ```scss
1167
- $carbon--base-font-size: 16px;
1168
- ```
1169
-
1170
- </details>
1171
-
1172
- - **Group**: [@carbon/layout](#carbonlayout)
1173
- - **Type**: `Number`
1174
- - **Used by**:
1175
- - [carbon--rem [function]](#carbon--rem-function)
1176
- - [carbon--em [function]](#carbon--em-function)
1177
-
1178
- ### ✅base-font-size [variable]
1179
-
1180
- Default font size
1181
-
1182
- <details>
1183
- <summary>Source code</summary>
1184
-
1185
- ```scss
1186
- $base-font-size: 16px;
1187
- ```
1188
-
1189
- </details>
1190
-
1191
- - **Group**: [@carbon/layout](#carbonlayout)
1192
- - **Type**: `Number`
1193
- - **Used by**:
1194
- - [rem [function]](#rem-function)
1195
- - [em [function]](#em-function)
1196
-
1197
- ### ✅carbon--rem [function]
1198
-
1199
- Convert a given px unit to a rem unit
1200
-
1201
- <details>
1202
- <summary>Source code</summary>
1203
-
1204
- ```scss
1205
- @function carbon--rem($px) {
1206
- @if unit($px) != 'px' {
1207
- // TODO: update to @error in v11
1208
- @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
1209
- }
1210
-
1211
- @return ($px / $carbon--base-font-size) * 1rem;
1212
- }
1213
- ```
1214
-
1215
- </details>
1216
-
1217
- - **Parameters**:
1218
-
1219
- | Name | Description | Type | Default value |
1220
- | ----- | ------------------- | -------- | ------------- |
1221
- | `$px` | Number with px unit | `Number` | — |
1222
-
1223
- - **Group**: [@carbon/layout](#carbonlayout)
1224
- - **Returns**: `Number` Number with rem unit
1225
- - **Requires**:
1226
- - [carbon--base-font-size [variable]](#carbon--base-font-size-variable)
1227
- - **Used by**:
1228
- - [carbon--mini-units [function]](#carbon--mini-units-function)
1229
-
1230
- ### ✅rem [function]
1231
-
1232
- Convert a given px unit to a rem unit
1233
-
1234
- <details>
1235
- <summary>Source code</summary>
1236
-
1237
- ```scss
1238
- @function rem($px) {
1239
- @if unit($px) != 'px' {
1240
- // TODO: update to @error in v11
1241
- @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
1242
- }
1243
-
1244
- @return ($px / $base-font-size) * 1rem;
1245
- }
1246
- ```
1247
-
1248
- </details>
1249
-
1250
- - **Parameters**:
1251
-
1252
- | Name | Description | Type | Default value |
1253
- | ----- | ------------------- | -------- | ------------- |
1254
- | `$px` | Number with px unit | `Number` | — |
1255
-
1256
- - **Group**: [@carbon/layout](#carbonlayout)
1257
- - **Returns**: `Number` Number with rem unit
1258
- - **Requires**:
1259
- - [base-font-size [variable]](#base-font-size-variable)
1260
-
1261
- ### ✅carbon--em [function]
1262
-
1263
- Convert a given px unit to a em unit
1264
-
1265
- <details>
1266
- <summary>Source code</summary>
1267
-
1268
- ```scss
1269
- @function carbon--em($px) {
1270
- @if unit($px) != 'px' {
1271
- // TODO: update to @error in v11
1272
- @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
1273
- }
1274
-
1275
- @return ($px / $carbon--base-font-size) * 1em;
1276
- }
1277
- ```
1278
-
1279
- </details>
1280
-
1281
- - **Parameters**:
1282
-
1283
- | Name | Description | Type | Default value |
1284
- | ----- | ------------------- | -------- | ------------- |
1285
- | `$px` | Number with px unit | `Number` | — |
1286
-
1287
- - **Group**: [@carbon/layout](#carbonlayout)
1288
- - **Returns**: `Number` Number with em unit
1289
- - **Requires**:
1290
- - [carbon--base-font-size [variable]](#carbon--base-font-size-variable)
1291
-
1292
- ### ✅em [function]
1293
-
1294
- Convert a given px unit to a em unit
1295
-
1296
- <details>
1297
- <summary>Source code</summary>
1298
-
1299
- ```scss
1300
- @function em($px) {
1301
- @if unit($px) != 'px' {
1302
- // TODO: update to @error in v11
1303
- @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
1304
- }
1305
-
1306
- @return ($px / $base-font-size) * 1em;
1307
- }
1308
- ```
1309
-
1310
- </details>
1311
-
1312
- - **Parameters**:
1313
-
1314
- | Name | Description | Type | Default value |
1315
- | ----- | ------------------- | -------- | ------------- |
1316
- | `$px` | Number with px unit | `Number` | — |
1317
-
1318
- - **Group**: [@carbon/layout](#carbonlayout)
1319
- - **Returns**: `Number` Number with em unit
1320
- - **Requires**:
1321
- - [base-font-size [variable]](#base-font-size-variable)
1322
-
1323
- ### ✅carbon--fluid-spacing-01 [variable]
1324
-
1325
- <details>
1326
- <summary>Source code</summary>
1327
-
1328
- ```scss
1329
- $carbon--fluid-spacing-01: 0;
1330
- ```
1331
-
1332
- </details>
1333
-
1334
- - **Group**: [@carbon/layout](#carbonlayout)
1335
- - **Type**: `Number`
1336
- - **Aliased**:
1337
- - `fluid-spacing-01`
1338
-
1339
- ### ✅fluid-spacing-01 [variable]
1340
-
1341
- <details>
1342
- <summary>Source code</summary>
1343
-
1344
- ```scss
1345
- $fluid-spacing-01: 0;
1346
- ```
1347
-
1348
- </details>
1349
-
1350
- - **Group**: [@carbon/layout](#carbonlayout)
1351
- - **Type**: `Number`
1352
-
1353
- ### ✅carbon--fluid-spacing-02 [variable]
1354
-
1355
- <details>
1356
- <summary>Source code</summary>
1357
-
1358
- ```scss
1359
- $carbon--fluid-spacing-02: 2vw;
1360
- ```
1361
-
1362
- </details>
1363
-
1364
- - **Group**: [@carbon/layout](#carbonlayout)
1365
- - **Type**: `Number`
1366
- - **Aliased**:
1367
- - `fluid-spacing-02`
1368
-
1369
- ### ✅fluid-spacing-02 [variable]
1370
-
1371
- <details>
1372
- <summary>Source code</summary>
1373
-
1374
- ```scss
1375
- $fluid-spacing-02: 2vw;
1376
- ```
1377
-
1378
- </details>
1379
-
1380
- - **Group**: [@carbon/layout](#carbonlayout)
1381
- - **Type**: `Number`
1382
-
1383
- ### ✅carbon--fluid-spacing-03 [variable]
1384
-
1385
- <details>
1386
- <summary>Source code</summary>
1387
-
1388
- ```scss
1389
- $carbon--fluid-spacing-03: 5vw;
1390
- ```
1391
-
1392
- </details>
1393
-
1394
- - **Group**: [@carbon/layout](#carbonlayout)
1395
- - **Type**: `Number`
1396
- - **Aliased**:
1397
- - `fluid-spacing-03`
1398
-
1399
- ### ✅fluid-spacing-03 [variable]
1400
-
1401
- <details>
1402
- <summary>Source code</summary>
1403
-
1404
- ```scss
1405
- $fluid-spacing-03: 5vw;
1406
- ```
1407
-
1408
- </details>
1409
-
1410
- - **Group**: [@carbon/layout](#carbonlayout)
1411
- - **Type**: `Number`
1412
-
1413
- ### ✅carbon--fluid-spacing-04 [variable]
1414
-
1415
- <details>
1416
- <summary>Source code</summary>
1417
-
1418
- ```scss
1419
- $carbon--fluid-spacing-04: 10vw;
1420
- ```
1421
-
1422
- </details>
1423
-
1424
- - **Group**: [@carbon/layout](#carbonlayout)
1425
- - **Type**: `Number`
1426
- - **Aliased**:
1427
- - `fluid-spacing-04`
1428
-
1429
- ### ✅fluid-spacing-04 [variable]
1430
-
1431
- <details>
1432
- <summary>Source code</summary>
1433
-
1434
- ```scss
1435
- $fluid-spacing-04: 10vw;
1436
- ```
1437
-
1438
- </details>
1439
-
1440
- - **Group**: [@carbon/layout](#carbonlayout)
1441
- - **Type**: `Number`
1442
-
1443
- ### ✅carbon--fluid-spacing [variable]
1444
-
1445
- <details>
1446
- <summary>Source code</summary>
1447
-
1448
- ```scss
1449
- $carbon--fluid-spacing: (
1450
- $carbon--fluid-spacing-01,
1451
- $carbon--fluid-spacing-02,
1452
- $carbon--fluid-spacing-03,
1453
- $carbon--fluid-spacing-04
1454
- );
1455
- ```
1456
-
1457
- </details>
1458
-
1459
- - **Group**: [@carbon/layout](#carbonlayout)
1460
- - **Type**: `List`
1461
-
1462
- ### ✅fluid-spacing [variable]
1463
-
1464
- <details>
1465
- <summary>Source code</summary>
1466
-
1467
- ```scss
1468
- $fluid-spacing: (
1469
- $fluid-spacing-01,
1470
- $fluid-spacing-02,
1471
- $fluid-spacing-03,
1472
- $fluid-spacing-04
1473
- );
1474
- ```
1475
-
1476
- </details>
1477
-
1478
- - **Group**: [@carbon/layout](#carbonlayout)
1479
- - **Type**: `List`
1480
-
1481
- ### ✅fluid-spacing-01 [variable]
1482
-
1483
- <details>
1484
- <summary>Source code</summary>
1485
-
1486
- ```scss
1487
- $fluid-spacing-01: $carbon--fluid-spacing-01;
1488
- ```
1489
-
1490
- </details>
1491
-
1492
- - **Group**: [@carbon/layout](#carbonlayout)
1493
- - **Type**: `Number`
1494
- - **Alias**: `carbon--fluid-spacing-01`
1495
-
1496
- ### ✅fluid-spacing-02 [variable]
1497
-
1498
- <details>
1499
- <summary>Source code</summary>
1500
-
1501
- ```scss
1502
- $fluid-spacing-02: $carbon--fluid-spacing-02;
1503
- ```
1504
-
1505
- </details>
1506
-
1507
- - **Group**: [@carbon/layout](#carbonlayout)
1508
- - **Type**: `Number`
1509
- - **Alias**: `carbon--fluid-spacing-02`
1510
-
1511
- ### ✅fluid-spacing-03 [variable]
1512
-
1513
- <details>
1514
- <summary>Source code</summary>
1515
-
1516
- ```scss
1517
- $fluid-spacing-03: $carbon--fluid-spacing-03;
1518
- ```
1519
-
1520
- </details>
1521
-
1522
- - **Group**: [@carbon/layout](#carbonlayout)
1523
- - **Type**: `Number`
1524
- - **Alias**: `carbon--fluid-spacing-03`
1525
-
1526
- ### ✅fluid-spacing-04 [variable]
1527
-
1528
- <details>
1529
- <summary>Source code</summary>
1530
-
1531
- ```scss
1532
- $fluid-spacing-04: $carbon--fluid-spacing-04;
1533
- ```
1534
-
1535
- </details>
1536
-
1537
- - **Group**: [@carbon/layout](#carbonlayout)
1538
- - **Type**: `Number`
1539
- - **Alias**: `carbon--fluid-spacing-04`
1540
-
1541
- ### ✅carbon--icon-size-01 [variable]
1542
-
1543
- <details>
1544
- <summary>Source code</summary>
1545
-
1546
- ```scss
1547
- $carbon--icon-size-01: 1rem;
1548
- ```
1549
-
1550
- </details>
1551
-
1552
- - **Group**: [@carbon/layout](#carbonlayout)
1553
- - **Type**: `Number`
1554
- - **Aliased**:
1555
- - `icon-size-01`
1556
-
1557
- ### ✅carbon--icon-size-02 [variable]
1558
-
1559
- <details>
1560
- <summary>Source code</summary>
1561
-
1562
- ```scss
1563
- $carbon--icon-size-02: 1.25rem;
1564
- ```
1565
-
1566
- </details>
1567
-
1568
- - **Group**: [@carbon/layout](#carbonlayout)
1569
- - **Type**: `Number`
1570
- - **Aliased**:
1571
- - `icon-size-02`
1572
-
1573
- ### ✅carbon--icon-size [variable]
1574
-
1575
- <details>
1576
- <summary>Source code</summary>
1577
-
1578
- ```scss
1579
- $carbon--icon-size: ($carbon--icon-size-01, $carbon--icon-size-02);
1580
- ```
1581
-
1582
- </details>
1583
-
1584
- - **Group**: [@carbon/layout](#carbonlayout)
1585
- - **Type**: `List`
1586
-
1587
- ### ✅icon-size-01 [variable]
1588
-
1589
- <details>
1590
- <summary>Source code</summary>
1591
-
1592
- ```scss
1593
- $icon-size-01: $carbon--icon-size-01;
1594
- ```
1595
-
1596
- </details>
1597
-
1598
- - **Group**: [@carbon/layout](#carbonlayout)
1599
- - **Type**: `Number`
1600
- - **Alias**: `carbon--icon-size-01`
1601
-
1602
- ### ✅icon-size-02 [variable]
1603
-
1604
- <details>
1605
- <summary>Source code</summary>
1606
-
1607
- ```scss
1608
- $icon-size-02: $carbon--icon-size-02;
1609
- ```
1610
-
1611
- </details>
1612
-
1613
- - **Group**: [@carbon/layout](#carbonlayout)
1614
- - **Type**: `Number`
1615
- - **Alias**: `carbon--icon-size-02`
1616
-
1617
- ### ✅carbon--get-column-width [function]
1618
-
1619
- Get the column width for a given breakpoint
1620
-
1621
- <details>
1622
- <summary>Source code</summary>
1623
-
1624
- ```scss
1625
- @function carbon--get-column-width(
1626
- $breakpoint,
1627
- $breakpoints: $carbon--grid-breakpoints
1628
- ) {
1629
- @if map-has-key($breakpoints, $breakpoint) {
1630
- $values: map-get($breakpoints, $breakpoint);
1631
- $width: map-get($values, width);
1632
- $margin: map-get($values, margin);
1633
- $columns: map-get($values, columns);
1634
-
1635
- @return ($width - (2 * $margin)) / $columns;
1636
- } @else {
1637
- @warn 'Breakpoint: `#{$breakpoint}` is not a valid breakpoint.';
1638
- }
1639
- }
1640
- ```
1641
-
1642
- </details>
1643
-
1644
- - **Parameters**:
1645
-
1646
- | Name | Description | Type | Default value |
1647
- | -------------- | ----------- | -------- | --------------------------- |
1648
- | `$breakpoint` | — | `String` | — |
1649
- | `$breakpoints` | — | `Map` | `$carbon--grid-breakpoints` |
1650
-
1651
- - **Group**: [@carbon/layout](#carbonlayout)
1652
- - **Returns**: `Number` In rem
1653
-
1654
- ### ✅carbon--key-height-scales [variable]
1655
-
1656
- <details>
1657
- <summary>Source code</summary>
1658
-
1659
- ```scss
1660
- $carbon--key-height-scales: (
1661
- sm: (
1662
- carbon--get-column-width(sm),
1663
- carbon--get-column-width(sm) * 2,
1664
- carbon--get-column-width(sm) * 3,
1665
- carbon--get-column-width(sm) * 4,
1666
- carbon--get-column-width(sm) * 5,
1667
- carbon--get-column-width(sm) * 6,
1668
- ),
1669
- md: (
1670
- carbon--get-column-width(md),
1671
- carbon--get-column-width(md) * 2,
1672
- carbon--get-column-width(md) * 3,
1673
- carbon--get-column-width(md) * 4,
1674
- carbon--get-column-width(md) * 5,
1675
- carbon--get-column-width(md) * 6,
1676
- ),
1677
- lg: (
1678
- carbon--get-column-width(lg),
1679
- carbon--get-column-width(lg) * 2,
1680
- carbon--get-column-width(lg) * 3,
1681
- carbon--get-column-width(lg) * 4,
1682
- carbon--get-column-width(lg) * 5,
1683
- carbon--get-column-width(lg) * 6,
1684
- carbon--get-column-width(lg) * 7,
1685
- carbon--get-column-width(lg) * 8,
1686
- ),
1687
- xlg: (
1688
- carbon--get-column-width(xlg),
1689
- carbon--get-column-width(xlg) * 2,
1690
- carbon--get-column-width(xlg) * 3,
1691
- carbon--get-column-width(xlg) * 4,
1692
- carbon--get-column-width(xlg) * 5,
1693
- carbon--get-column-width(xlg) * 6,
1694
- carbon--get-column-width(xlg) * 7,
1695
- carbon--get-column-width(xlg) * 8,
1696
- ),
1697
- max: (
1698
- carbon--get-column-width(max),
1699
- carbon--get-column-width(max) * 2,
1700
- carbon--get-column-width(max) * 3,
1701
- carbon--get-column-width(max) * 4,
1702
- carbon--get-column-width(max) * 5,
1703
- carbon--get-column-width(max) * 6,
1704
- carbon--get-column-width(max) * 7,
1705
- carbon--get-column-width(max) * 8,
1706
- ),
1707
- );
1708
- ```
1709
-
1710
- </details>
1711
-
1712
- - **Group**: [@carbon/layout](#carbonlayout)
1713
- - **Type**: `Map`
1714
- - **Used by**:
1715
- - [carbon--key-height [function]](#carbon--key-height-function)
1716
-
1717
- ### ✅carbon--key-height [function]
1718
-
1719
- Get the value of a key height step at a given breakpoint
1720
-
1721
- <details>
1722
- <summary>Source code</summary>
1723
-
1724
- ```scss
1725
- @function carbon--key-height($breakpoint, $step) {
1726
- @if map-has-key($carbon--key-height-scales, $breakpoint) {
1727
- @return nth(map-get($carbon--key-height-scales, $breakpoint), $step);
1728
- } @else {
1729
- @warn 'Breakpoint: `#{$breakpoint}` is not a valid breakpoint.';
1730
- }
1731
- }
1732
- ```
1733
-
1734
- </details>
1735
-
1736
- - **Parameters**:
1737
-
1738
- | Name | Description | Type | Default value |
1739
- | ------------- | ----------- | -------- | ------------- |
1740
- | `$breakpoint` | — | `String` | — |
1741
- | `$step` | — | `Number` | — |
1742
-
1743
- - **Group**: [@carbon/layout](#carbonlayout)
1744
- - **Returns**: `Number` In rem
1745
- - **Requires**:
1746
- - [carbon--key-height-scales [variable]](#carbon--key-height-scales-variable)
1747
-
1748
- ### ✅carbon--layout-01 [variable]
1749
-
1750
- <details>
1751
- <summary>Source code</summary>
1752
-
1753
- ```scss
1754
- $carbon--layout-01: 1rem;
1755
- ```
1756
-
1757
- </details>
1758
-
1759
- - **Group**: [@carbon/layout](#carbonlayout)
1760
- - **Type**: `Number`
1761
- - **Aliased**:
1762
- - `layout-01`
1763
-
1764
- ### ✅carbon--layout-02 [variable]
1765
-
1766
- <details>
1767
- <summary>Source code</summary>
1768
-
1769
- ```scss
1770
- $carbon--layout-02: 1.5rem;
1771
- ```
1772
-
1773
- </details>
1774
-
1775
- - **Group**: [@carbon/layout](#carbonlayout)
1776
- - **Type**: `Number`
1777
- - **Aliased**:
1778
- - `layout-02`
1779
-
1780
- ### ✅carbon--layout-03 [variable]
1781
-
1782
- <details>
1783
- <summary>Source code</summary>
1784
-
1785
- ```scss
1786
- $carbon--layout-03: 2rem;
1787
- ```
1788
-
1789
- </details>
1790
-
1791
- - **Group**: [@carbon/layout](#carbonlayout)
1792
- - **Type**: `Number`
1793
- - **Aliased**:
1794
- - `layout-03`
1795
-
1796
- ### ✅carbon--layout-04 [variable]
1797
-
1798
- <details>
1799
- <summary>Source code</summary>
1800
-
1801
- ```scss
1802
- $carbon--layout-04: 3rem;
1803
- ```
1804
-
1805
- </details>
1806
-
1807
- - **Group**: [@carbon/layout](#carbonlayout)
1808
- - **Type**: `Number`
1809
- - **Aliased**:
1810
- - `layout-04`
1811
-
1812
- ### ✅carbon--layout-05 [variable]
1813
-
1814
- <details>
1815
- <summary>Source code</summary>
1816
-
1817
- ```scss
1818
- $carbon--layout-05: 4rem;
1819
- ```
1820
-
1821
- </details>
1822
-
1823
- - **Group**: [@carbon/layout](#carbonlayout)
1824
- - **Type**: `Number`
1825
- - **Aliased**:
1826
- - `layout-05`
1827
-
1828
- ### ✅carbon--layout-06 [variable]
1829
-
1830
- <details>
1831
- <summary>Source code</summary>
1832
-
1833
- ```scss
1834
- $carbon--layout-06: 6rem;
1835
- ```
1836
-
1837
- </details>
1838
-
1839
- - **Group**: [@carbon/layout](#carbonlayout)
1840
- - **Type**: `Number`
1841
- - **Aliased**:
1842
- - `layout-06`
1843
-
1844
- ### ✅carbon--layout-07 [variable]
1845
-
1846
- <details>
1847
- <summary>Source code</summary>
1848
-
1849
- ```scss
1850
- $carbon--layout-07: 10rem;
1851
- ```
1852
-
1853
- </details>
1854
-
1855
- - **Group**: [@carbon/layout](#carbonlayout)
1856
- - **Type**: `Number`
1857
- - **Aliased**:
1858
- - `layout-07`
1859
-
1860
- ### ✅carbon--layout [variable]
1861
-
1862
- <details>
1863
- <summary>Source code</summary>
1864
-
1865
- ```scss
1866
- $carbon--layout: (
1867
- $carbon--layout-01,
1868
- $carbon--layout-02,
1869
- $carbon--layout-03,
1870
- $carbon--layout-04,
1871
- $carbon--layout-05,
1872
- $carbon--layout-06,
1873
- $carbon--layout-07
1874
- );
1875
- ```
1876
-
1877
- </details>
1878
-
1879
- - **Group**: [@carbon/layout](#carbonlayout)
1880
- - **Type**: `List`
1881
-
1882
- ### ✅layout-01 [variable]
1883
-
1884
- <details>
1885
- <summary>Source code</summary>
1886
-
1887
- ```scss
1888
- $layout-01: $carbon--layout-01;
1889
- ```
1890
-
1891
- </details>
1892
-
1893
- - **Group**: [@carbon/layout](#carbonlayout)
1894
- - **Type**: `Number`
1895
- - **Alias**: `carbon--layout-01`
1896
-
1897
- ### ✅layout-02 [variable]
1898
-
1899
- <details>
1900
- <summary>Source code</summary>
1901
-
1902
- ```scss
1903
- $layout-02: $carbon--layout-02;
1904
- ```
1905
-
1906
- </details>
1907
-
1908
- - **Group**: [@carbon/layout](#carbonlayout)
1909
- - **Type**: `Number`
1910
- - **Alias**: `carbon--layout-02`
1911
-
1912
- ### ✅layout-03 [variable]
1913
-
1914
- <details>
1915
- <summary>Source code</summary>
1916
-
1917
- ```scss
1918
- $layout-03: $carbon--layout-03;
1919
- ```
1920
-
1921
- </details>
1922
-
1923
- - **Group**: [@carbon/layout](#carbonlayout)
1924
- - **Type**: `Number`
1925
- - **Alias**: `carbon--layout-03`
1926
-
1927
- ### ✅layout-04 [variable]
1928
-
1929
- <details>
1930
- <summary>Source code</summary>
1931
-
1932
- ```scss
1933
- $layout-04: $carbon--layout-04;
1934
- ```
1935
-
1936
- </details>
1937
-
1938
- - **Group**: [@carbon/layout](#carbonlayout)
1939
- - **Type**: `Number`
1940
- - **Alias**: `carbon--layout-04`
1941
-
1942
- ### ✅layout-05 [variable]
1943
-
1944
- <details>
1945
- <summary>Source code</summary>
1946
-
1947
- ```scss
1948
- $layout-05: $carbon--layout-05;
1949
- ```
1950
-
1951
- </details>
1952
-
1953
- - **Group**: [@carbon/layout](#carbonlayout)
1954
- - **Type**: `Number`
1955
- - **Alias**: `carbon--layout-05`
1956
-
1957
- ### ✅layout-06 [variable]
1958
-
1959
- <details>
1960
- <summary>Source code</summary>
1961
-
1962
- ```scss
1963
- $layout-06: $carbon--layout-06;
1964
- ```
1965
-
1966
- </details>
1967
-
1968
- - **Group**: [@carbon/layout](#carbonlayout)
1969
- - **Type**: `Number`
1970
- - **Alias**: `carbon--layout-06`
1971
-
1972
- ### ✅layout-07 [variable]
1973
-
1974
- <details>
1975
- <summary>Source code</summary>
1976
-
1977
- ```scss
1978
- $layout-07: $carbon--layout-07;
1979
- ```
1980
-
1981
- </details>
1982
-
1983
- - **Group**: [@carbon/layout](#carbonlayout)
1984
- - **Type**: `Number`
1985
- - **Alias**: `carbon--layout-07`
1986
-
1987
- ### ✅carbon--mini-unit-size [variable]
1988
-
1989
- Default mini-unit value
1990
-
1991
- <details>
1992
- <summary>Source code</summary>
1993
-
1994
- ```scss
1995
- $carbon--mini-unit-size: 8px;
1996
- ```
1997
-
1998
- </details>
1999
-
2000
- - **Group**: [@carbon/layout](#carbonlayout)
2001
- - **Type**: `Number`
2002
- - **Used by**:
2003
- - [carbon--mini-units [function]](#carbon--mini-units-function)
2004
-
2005
- ### ✅carbon--mini-units [function]
2006
-
2007
- Get the value of the corresponding number of units
2008
-
2009
- <details>
2010
- <summary>Source code</summary>
2011
-
2012
- ```scss
2013
- @function carbon--mini-units($count) {
2014
- @return carbon--rem($carbon--mini-unit-size * $count);
2015
- }
2016
- ```
2017
-
2018
- </details>
2019
-
2020
- - **Parameters**:
2021
-
2022
- | Name | Description | Type | Default value |
2023
- | -------- | ---------------------------------------- | -------- | ------------- |
2024
- | `$count` | The number of units to get the value for | `Number` | — |
2025
-
2026
- - **Group**: [@carbon/layout](#carbonlayout)
2027
- - **Returns**: `Number` In rem units
2028
- - **Requires**:
2029
- - [carbon--rem [function]](#carbon--rem-function)
2030
- - [carbon--mini-unit-size [variable]](#carbon--mini-unit-size-variable)
2031
-
2032
- ### ✅carbon--spacing-01 [variable]
2033
-
2034
- <details>
2035
- <summary>Source code</summary>
2036
-
2037
- ```scss
2038
- $carbon--spacing-01: 0.125rem;
2039
- ```
2040
-
2041
- </details>
2042
-
2043
- - **Group**: [@carbon/layout](#carbonlayout)
2044
- - **Type**: `Number`
2045
- - **Aliased**:
2046
- - `spacing-01`
2047
-
2048
- ### ✅spacing-01 [variable]
2049
-
2050
- <details>
2051
- <summary>Source code</summary>
2052
-
2053
- ```scss
2054
- $spacing-01: 0.125rem;
2055
- ```
2056
-
2057
- </details>
2058
-
2059
- - **Group**: [@carbon/layout](#carbonlayout)
2060
- - **Type**: `Number`
2061
-
2062
- ### ✅carbon--spacing-02 [variable]
2063
-
2064
- <details>
2065
- <summary>Source code</summary>
2066
-
2067
- ```scss
2068
- $carbon--spacing-02: 0.25rem;
2069
- ```
2070
-
2071
- </details>
2072
-
2073
- - **Group**: [@carbon/layout](#carbonlayout)
2074
- - **Type**: `Number`
2075
- - **Aliased**:
2076
- - `spacing-02`
2077
-
2078
- ### ✅spacing-02 [variable]
2079
-
2080
- <details>
2081
- <summary>Source code</summary>
2082
-
2083
- ```scss
2084
- $spacing-02: 0.25rem;
2085
- ```
2086
-
2087
- </details>
2088
-
2089
- - **Group**: [@carbon/layout](#carbonlayout)
2090
- - **Type**: `Number`
2091
-
2092
- ### ✅carbon--spacing-03 [variable]
2093
-
2094
- <details>
2095
- <summary>Source code</summary>
2096
-
2097
- ```scss
2098
- $carbon--spacing-03: 0.5rem;
2099
- ```
2100
-
2101
- </details>
2102
-
2103
- - **Group**: [@carbon/layout](#carbonlayout)
2104
- - **Type**: `Number`
2105
- - **Aliased**:
2106
- - `spacing-03`
2107
-
2108
- ### ✅spacing-03 [variable]
2109
-
2110
- <details>
2111
- <summary>Source code</summary>
2112
-
2113
- ```scss
2114
- $spacing-03: 0.5rem;
2115
- ```
2116
-
2117
- </details>
2118
-
2119
- - **Group**: [@carbon/layout](#carbonlayout)
2120
- - **Type**: `Number`
2121
-
2122
- ### ✅carbon--spacing-04 [variable]
2123
-
2124
- <details>
2125
- <summary>Source code</summary>
2126
-
2127
- ```scss
2128
- $carbon--spacing-04: 0.75rem;
2129
- ```
2130
-
2131
- </details>
2132
-
2133
- - **Group**: [@carbon/layout](#carbonlayout)
2134
- - **Type**: `Number`
2135
- - **Aliased**:
2136
- - `spacing-04`
2137
-
2138
- ### ✅spacing-04 [variable]
2139
-
2140
- <details>
2141
- <summary>Source code</summary>
2142
-
2143
- ```scss
2144
- $spacing-04: 0.75rem;
2145
- ```
2146
-
2147
- </details>
2148
-
2149
- - **Group**: [@carbon/layout](#carbonlayout)
2150
- - **Type**: `Number`
2151
-
2152
- ### ✅carbon--spacing-05 [variable]
2153
-
2154
- <details>
2155
- <summary>Source code</summary>
2156
-
2157
- ```scss
2158
- $carbon--spacing-05: 1rem;
2159
- ```
2160
-
2161
- </details>
2162
-
2163
- - **Group**: [@carbon/layout](#carbonlayout)
2164
- - **Type**: `Number`
2165
- - **Aliased**:
2166
- - `spacing-05`
2167
-
2168
- ### ✅spacing-05 [variable]
2169
-
2170
- <details>
2171
- <summary>Source code</summary>
2172
-
2173
- ```scss
2174
- $spacing-05: 1rem;
2175
- ```
2176
-
2177
- </details>
2178
-
2179
- - **Group**: [@carbon/layout](#carbonlayout)
2180
- - **Type**: `Number`
2181
-
2182
- ### ✅carbon--spacing-06 [variable]
2183
-
2184
- <details>
2185
- <summary>Source code</summary>
2186
-
2187
- ```scss
2188
- $carbon--spacing-06: 1.5rem;
2189
- ```
2190
-
2191
- </details>
2192
-
2193
- - **Group**: [@carbon/layout](#carbonlayout)
2194
- - **Type**: `Number`
2195
- - **Aliased**:
2196
- - `spacing-06`
2197
-
2198
- ### ✅spacing-06 [variable]
2199
-
2200
- <details>
2201
- <summary>Source code</summary>
2202
-
2203
- ```scss
2204
- $spacing-06: 1.5rem;
2205
- ```
2206
-
2207
- </details>
2208
-
2209
- - **Group**: [@carbon/layout](#carbonlayout)
2210
- - **Type**: `Number`
2211
-
2212
- ### ✅carbon--spacing-07 [variable]
2213
-
2214
- <details>
2215
- <summary>Source code</summary>
2216
-
2217
- ```scss
2218
- $carbon--spacing-07: 2rem;
2219
- ```
2220
-
2221
- </details>
2222
-
2223
- - **Group**: [@carbon/layout](#carbonlayout)
2224
- - **Type**: `Number`
2225
- - **Aliased**:
2226
- - `spacing-07`
2227
-
2228
- ### ✅spacing-07 [variable]
2229
-
2230
- <details>
2231
- <summary>Source code</summary>
2232
-
2233
- ```scss
2234
- $spacing-07: 2rem;
2235
- ```
2236
-
2237
- </details>
2238
-
2239
- - **Group**: [@carbon/layout](#carbonlayout)
2240
- - **Type**: `Number`
2241
-
2242
- ### ✅carbon--spacing-08 [variable]
2243
-
2244
- <details>
2245
- <summary>Source code</summary>
2246
-
2247
- ```scss
2248
- $carbon--spacing-08: 2.5rem;
2249
- ```
2250
-
2251
- </details>
2252
-
2253
- - **Group**: [@carbon/layout](#carbonlayout)
2254
- - **Type**: `Number`
2255
- - **Aliased**:
2256
- - `spacing-08`
2257
-
2258
- ### ✅spacing-08 [variable]
2259
-
2260
- <details>
2261
- <summary>Source code</summary>
2262
-
2263
- ```scss
2264
- $spacing-08: 2.5rem;
2265
- ```
2266
-
2267
- </details>
2268
-
2269
- - **Group**: [@carbon/layout](#carbonlayout)
2270
- - **Type**: `Number`
2271
-
2272
- ### ✅carbon--spacing-09 [variable]
2273
-
2274
- <details>
2275
- <summary>Source code</summary>
2276
-
2277
- ```scss
2278
- $carbon--spacing-09: 3rem;
2279
- ```
2280
-
2281
- </details>
2282
-
2283
- - **Group**: [@carbon/layout](#carbonlayout)
2284
- - **Type**: `Number`
2285
- - **Aliased**:
2286
- - `spacing-09`
2287
-
2288
- ### ✅spacing-09 [variable]
2289
-
2290
- <details>
2291
- <summary>Source code</summary>
2292
-
2293
- ```scss
2294
- $spacing-09: 3rem;
2295
- ```
2296
-
2297
- </details>
2298
-
2299
- - **Group**: [@carbon/layout](#carbonlayout)
2300
- - **Type**: `Number`
2301
-
2302
- ### ✅carbon--spacing-10 [variable]
2303
-
2304
- <details>
2305
- <summary>Source code</summary>
2306
-
2307
- ```scss
2308
- $carbon--spacing-10: 4rem;
2309
- ```
2310
-
2311
- </details>
2312
-
2313
- - **Group**: [@carbon/layout](#carbonlayout)
2314
- - **Type**: `Number`
2315
- - **Aliased**:
2316
- - `spacing-10`
2317
-
2318
- ### ✅spacing-10 [variable]
2319
-
2320
- <details>
2321
- <summary>Source code</summary>
2322
-
2323
- ```scss
2324
- $spacing-10: 4rem;
2325
- ```
2326
-
2327
- </details>
2328
-
2329
- - **Group**: [@carbon/layout](#carbonlayout)
2330
- - **Type**: `Number`
2331
-
2332
- ### ✅carbon--spacing-11 [variable]
2333
-
2334
- <details>
2335
- <summary>Source code</summary>
2336
-
2337
- ```scss
2338
- $carbon--spacing-11: 5rem;
2339
- ```
2340
-
2341
- </details>
2342
-
2343
- - **Group**: [@carbon/layout](#carbonlayout)
2344
- - **Type**: `Number`
2345
- - **Aliased**:
2346
- - `spacing-11`
2347
-
2348
- ### ✅spacing-11 [variable]
2349
-
2350
- <details>
2351
- <summary>Source code</summary>
2352
-
2353
- ```scss
2354
- $spacing-11: 5rem;
2355
- ```
2356
-
2357
- </details>
2358
-
2359
- - **Group**: [@carbon/layout](#carbonlayout)
2360
- - **Type**: `Number`
2361
-
2362
- ### ✅carbon--spacing-12 [variable]
2363
-
2364
- <details>
2365
- <summary>Source code</summary>
2366
-
2367
- ```scss
2368
- $carbon--spacing-12: 6rem;
2369
- ```
2370
-
2371
- </details>
2372
-
2373
- - **Group**: [@carbon/layout](#carbonlayout)
2374
- - **Type**: `Number`
2375
- - **Aliased**:
2376
- - `spacing-12`
2377
-
2378
- ### ✅spacing-12 [variable]
2379
-
2380
- <details>
2381
- <summary>Source code</summary>
2382
-
2383
- ```scss
2384
- $spacing-12: 6rem;
2385
- ```
2386
-
2387
- </details>
2388
-
2389
- - **Group**: [@carbon/layout](#carbonlayout)
2390
- - **Type**: `Number`
2391
-
2392
- ### ✅carbon--spacing [variable]
2393
-
2394
- <details>
2395
- <summary>Source code</summary>
2396
-
2397
- ```scss
2398
- $carbon--spacing: (
2399
- $carbon--spacing-01,
2400
- $carbon--spacing-02,
2401
- $carbon--spacing-03,
2402
- $carbon--spacing-04,
2403
- $carbon--spacing-05,
2404
- $carbon--spacing-06,
2405
- $carbon--spacing-07,
2406
- $carbon--spacing-08,
2407
- $carbon--spacing-09,
2408
- $carbon--spacing-10,
2409
- $carbon--spacing-11,
2410
- $carbon--spacing-12
2411
- );
2412
- ```
2413
-
2414
- </details>
2415
-
2416
- - **Group**: [@carbon/layout](#carbonlayout)
2417
- - **Type**: `List`
2418
-
2419
- ### ✅spacing [variable]
2420
-
2421
- <details>
2422
- <summary>Source code</summary>
2423
-
2424
- ```scss
2425
- $spacing: (
2426
- $spacing-01,
2427
- $spacing-02,
2428
- $spacing-03,
2429
- $spacing-04,
2430
- $spacing-05,
2431
- $spacing-06,
2432
- $spacing-07,
2433
- $spacing-08,
2434
- $spacing-09,
2435
- $spacing-10,
2436
- $spacing-11,
2437
- $spacing-12
2438
- );
2439
- ```
2440
-
2441
- </details>
2442
-
2443
- - **Group**: [@carbon/layout](#carbonlayout)
2444
- - **Type**: `List`
2445
-
2446
- ### ✅spacing-01 [variable]
2447
-
2448
- <details>
2449
- <summary>Source code</summary>
2450
-
2451
- ```scss
2452
- $spacing-01: $carbon--spacing-01;
2453
- ```
2454
-
2455
- </details>
2456
-
2457
- - **Group**: [@carbon/layout](#carbonlayout)
2458
- - **Type**: `Number`
2459
- - **Alias**: `carbon--spacing-01`
2460
-
2461
- ### ✅spacing-02 [variable]
2462
-
2463
- <details>
2464
- <summary>Source code</summary>
2465
-
2466
- ```scss
2467
- $spacing-02: $carbon--spacing-02;
2468
- ```
2469
-
2470
- </details>
2471
-
2472
- - **Group**: [@carbon/layout](#carbonlayout)
2473
- - **Type**: `Number`
2474
- - **Alias**: `carbon--spacing-02`
2475
-
2476
- ### ✅spacing-03 [variable]
2477
-
2478
- <details>
2479
- <summary>Source code</summary>
2480
-
2481
- ```scss
2482
- $spacing-03: $carbon--spacing-03;
2483
- ```
2484
-
2485
- </details>
2486
-
2487
- - **Group**: [@carbon/layout](#carbonlayout)
2488
- - **Type**: `Number`
2489
- - **Alias**: `carbon--spacing-03`
2490
-
2491
- ### ✅spacing-04 [variable]
2492
-
2493
- <details>
2494
- <summary>Source code</summary>
2495
-
2496
- ```scss
2497
- $spacing-04: $carbon--spacing-04;
2498
- ```
2499
-
2500
- </details>
2501
-
2502
- - **Group**: [@carbon/layout](#carbonlayout)
2503
- - **Type**: `Number`
2504
- - **Alias**: `carbon--spacing-04`
2505
-
2506
- ### ✅spacing-05 [variable]
2507
-
2508
- <details>
2509
- <summary>Source code</summary>
2510
-
2511
- ```scss
2512
- $spacing-05: $carbon--spacing-05;
2513
- ```
2514
-
2515
- </details>
2516
-
2517
- - **Group**: [@carbon/layout](#carbonlayout)
2518
- - **Type**: `Number`
2519
- - **Alias**: `carbon--spacing-05`
2520
-
2521
- ### ✅spacing-06 [variable]
2522
-
2523
- <details>
2524
- <summary>Source code</summary>
2525
-
2526
- ```scss
2527
- $spacing-06: $carbon--spacing-06;
2528
- ```
2529
-
2530
- </details>
2531
-
2532
- - **Group**: [@carbon/layout](#carbonlayout)
2533
- - **Type**: `Number`
2534
- - **Alias**: `carbon--spacing-06`
2535
-
2536
- ### ✅spacing-07 [variable]
2537
-
2538
- <details>
2539
- <summary>Source code</summary>
2540
-
2541
- ```scss
2542
- $spacing-07: $carbon--spacing-07;
2543
- ```
2544
-
2545
- </details>
2546
-
2547
- - **Group**: [@carbon/layout](#carbonlayout)
2548
- - **Type**: `Number`
2549
- - **Alias**: `carbon--spacing-07`
2550
-
2551
- ### ✅spacing-08 [variable]
2552
-
2553
- <details>
2554
- <summary>Source code</summary>
2555
-
2556
- ```scss
2557
- $spacing-08: $carbon--spacing-08;
2558
- ```
2559
-
2560
- </details>
2561
-
2562
- - **Group**: [@carbon/layout](#carbonlayout)
2563
- - **Type**: `Number`
2564
- - **Alias**: `carbon--spacing-08`
2565
-
2566
- ### ✅spacing-09 [variable]
2567
-
2568
- <details>
2569
- <summary>Source code</summary>
2570
-
2571
- ```scss
2572
- $spacing-09: $carbon--spacing-09;
2573
- ```
2574
-
2575
- </details>
2576
-
2577
- - **Group**: [@carbon/layout](#carbonlayout)
2578
- - **Type**: `Number`
2579
- - **Alias**: `carbon--spacing-09`
2580
-
2581
- ### ✅spacing-10 [variable]
2582
-
2583
- <details>
2584
- <summary>Source code</summary>
2585
-
2586
- ```scss
2587
- $spacing-10: $carbon--spacing-10;
2588
- ```
2589
-
2590
- </details>
2591
-
2592
- - **Group**: [@carbon/layout](#carbonlayout)
2593
- - **Type**: `Number`
2594
- - **Alias**: `carbon--spacing-10`
2595
-
2596
- ### ✅spacing-11 [variable]
2597
-
2598
- <details>
2599
- <summary>Source code</summary>
2600
-
2601
- ```scss
2602
- $spacing-11: $carbon--spacing-11;
2603
- ```
2604
-
2605
- </details>
2606
-
2607
- - **Group**: [@carbon/layout](#carbonlayout)
2608
- - **Type**: `Number`
2609
- - **Alias**: `carbon--spacing-11`
2610
-
2611
- ### ✅spacing-12 [variable]
2612
-
2613
- <details>
2614
- <summary>Source code</summary>
2615
-
2616
- ```scss
2617
- $spacing-12: $carbon--spacing-12;
2618
- ```
2619
-
2620
- </details>
2621
-
2622
- - **Group**: [@carbon/layout](#carbonlayout)
2623
- - **Type**: `Number`
2624
- - **Alias**: `carbon--spacing-12`
2625
-
2626
- ### ✅map-deep-get [function]
2627
-
2628
- Map deep get
2629
-
2630
- <details>
2631
- <summary>Source code</summary>
2632
-
2633
- ```scss
2634
- @function map-deep-get($map, $keys) {
2635
- @each $key in $keys {
2636
- $map: map-get($map, $key);
2637
- }
2638
- @return $map;
2639
- }
2640
- ```
2641
-
2642
- </details>
2643
-
2644
- - **Parameters**:
2645
-
2646
- | Name | Description | Type | Default value |
2647
- | ------- | ----------- | --------- | ------------- |
2648
- | `$map` | Map | `Map` | — |
2649
- | `$keys` | Key chain | `Arglist` | — |
2650
-
2651
- - **Group**: [@carbon/layout](#carbonlayout)
2652
- - **Returns**: `*` Desired value
2653
-
2654
- ### ✅map-deep-get [function]
2655
-
2656
- Map deep get
2657
-
2658
- <details>
2659
- <summary>Source code</summary>
2660
-
2661
- ```scss
2662
- @function map-deep-get($map, $keys) {
2663
- @each $key in $keys {
2664
- $map: map-get($map, $key);
2665
- }
2666
- @return $map;
2667
- }
2668
- ```
2669
-
2670
- </details>
2671
-
2672
- - **Parameters**:
2673
-
2674
- | Name | Description | Type | Default value |
2675
- | ------- | ----------- | --------- | ------------- |
2676
- | `$map` | Map | `Map` | — |
2677
- | `$keys` | Key chain | `Arglist` | — |
2678
-
2679
- - **Group**: [@carbon/layout](#carbonlayout)
2680
- - **Returns**: `*` Desired value
2681
-
2682
- ### ✅carbon--key-by-index [function]
2683
-
2684
- Provide a map and index, and get back the relevant key value
2685
-
2686
- <details>
2687
- <summary>Source code</summary>
2688
-
2689
- ```scss
2690
- @function carbon--key-by-index($map, $index) {
2691
- $keys: map-keys($map);
2692
- @return nth($keys, $index);
2693
- }
2694
- ```
2695
-
2696
- </details>
2697
-
2698
- - **Parameters**:
2699
-
2700
- | Name | Description | Type | Default value |
2701
- | -------- | ----------- | --------- | ------------- |
2702
- | `$map` | Map | `Map` | — |
2703
- | `$index` | Key chain | `Integer` | — |
2704
-
2705
- - **Group**: [@carbon/layout](#carbonlayout)
2706
- - **Returns**: `String` Desired value
2707
- - **Used by**:
2708
- - [carbon--largest-breakpoint-name [function]](#carbon--largest-breakpoint-name-function)
2709
- - [last-map-item [function]](#last-map-item-function)
2710
-
2711
- ### ✅key-by-index [function]
2712
-
2713
- Provide a map and index, and get back the relevant key value
2714
-
2715
- <details>
2716
- <summary>Source code</summary>
2717
-
2718
- ```scss
2719
- @function key-by-index($map, $index) {
2720
- $keys: map-keys($map);
2721
- @return nth($keys, $index);
2722
- }
2723
- ```
2724
-
2725
- </details>
2726
-
2727
- - **Parameters**:
2728
-
2729
- | Name | Description | Type | Default value |
2730
- | -------- | ----------- | --------- | ------------- |
2731
- | `$map` | Map | `Map` | — |
2732
- | `$index` | Key chain | `Integer` | — |
2733
-
2734
- - **Group**: [@carbon/layout](#carbonlayout)
2735
- - **Returns**: `String` Desired value
2736
- - **Used by**:
2737
- - [largest-breakpoint-name [function]](#largest-breakpoint-name-function)
2738
-
2739
- ### ✅last-map-item [function]
2740
-
2741
- Pass in a map, and get the last one in the list back
2742
-
2743
- <details>
2744
- <summary>Source code</summary>
2745
-
2746
- ```scss
2747
- @function last-map-item($map) {
2748
- $total-length: length($map);
2749
- @return map-get($map, carbon--key-by-index($map, $total-length));
2750
- }
2751
- ```
2752
-
2753
- </details>
2754
-
2755
- - **Parameters**:
2756
-
2757
- | Name | Description | Type | Default value |
2758
- | ------ | ----------- | ----- | ------------- |
2759
- | `$map` | Map | `Map` | — |
2760
-
2761
- - **Group**: [@carbon/layout](#carbonlayout)
2762
- - **Returns**: `*` Desired value
2763
- - **Requires**:
2764
- - [carbon--key-by-index [function]](#carbon--key-by-index-function)
2765
-
2766
- ### ✅last-map-item [function]
2767
-
2768
- Pass in a map, and get the last one in the list back
2769
-
2770
- <details>
2771
- <summary>Source code</summary>
2772
-
2773
- ```scss
2774
- @function last-map-item($map) {
2775
- $total-length: length($map);
2776
- @return map-get($map, carbon--key-by-index($map, $total-length));
2777
- }
2778
- ```
2779
-
2780
- </details>
2781
-
2782
- - **Parameters**:
2783
-
2784
- | Name | Description | Type | Default value |
2785
- | ------ | ----------- | ----- | ------------- |
2786
- | `$map` | Map | `Map` | — |
2787
-
2788
- - **Group**: [@carbon/layout](#carbonlayout)
2789
- - **Returns**: `*` Desired value
2790
- - **Requires**:
2791
- - [carbon--key-by-index [function]](#carbon--key-by-index-function)