@carbon/layout 10.0.0-rc.0 → 10.2.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/CHANGELOG.md +464 -0
- package/LICENSE +2 -2
- package/README.md +23 -19
- package/docs/sass.md +1681 -0
- package/es/index.js +6 -3
- package/lib/index.js +8 -2
- package/package.json +4 -4
- package/scss/_breakpoint.scss +63 -25
- package/scss/_convert.scss +12 -5
- package/scss/_key-height.scss +14 -7
- package/scss/_mini-unit.scss +8 -3
- package/scss/_spacing.scss +274 -1
- package/scss/_utilities.scss +10 -8
- package/scss/index.scss +8 -0
- package/src/index.js +7 -1
- package/umd/index.js +8 -2
package/es/index.js
CHANGED
|
@@ -27,7 +27,7 @@ function em(px) {
|
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Convert a given px unit to its string representation
|
|
30
|
-
* @param {number}
|
|
30
|
+
* @param {number} value - number of pixels
|
|
31
31
|
* @returns {string}
|
|
32
32
|
*/
|
|
33
33
|
|
|
@@ -87,7 +87,10 @@ var spacing06 = miniUnits(3);
|
|
|
87
87
|
var spacing07 = miniUnits(4);
|
|
88
88
|
var spacing08 = miniUnits(5);
|
|
89
89
|
var spacing09 = miniUnits(6);
|
|
90
|
-
var
|
|
90
|
+
var spacing10 = miniUnits(8);
|
|
91
|
+
var spacing11 = miniUnits(10);
|
|
92
|
+
var spacing12 = miniUnits(12);
|
|
93
|
+
var spacing = [spacing01, spacing02, spacing03, spacing04, spacing05, spacing06, spacing07, spacing08, spacing09, spacing10, spacing11, spacing12]; // Layout
|
|
91
94
|
|
|
92
95
|
var layout01 = miniUnits(2);
|
|
93
96
|
var layout02 = miniUnits(3);
|
|
@@ -98,4 +101,4 @@ var layout06 = miniUnits(12);
|
|
|
98
101
|
var layout07 = miniUnits(20);
|
|
99
102
|
var layout = [layout01, layout02, layout03, layout04, layout05, layout06, layout07];
|
|
100
103
|
|
|
101
|
-
export { baseFontSize, rem, em, px, breakpoints, breakpointUp, breakpointDown, breakpoint, miniUnit, miniUnits, spacing01, spacing02, spacing03, spacing04, spacing05, spacing06, spacing07, spacing08, spacing09, spacing, layout01, layout02, layout03, layout04, layout05, layout06, layout07, layout };
|
|
104
|
+
export { baseFontSize, rem, em, px, breakpoints, breakpointUp, breakpointDown, breakpoint, miniUnit, miniUnits, spacing01, spacing02, spacing03, spacing04, spacing05, spacing06, spacing07, spacing08, spacing09, spacing10, spacing11, spacing12, spacing, layout01, layout02, layout03, layout04, layout05, layout06, layout07, layout };
|
package/lib/index.js
CHANGED
|
@@ -31,7 +31,7 @@ function em(px) {
|
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Convert a given px unit to its string representation
|
|
34
|
-
* @param {number}
|
|
34
|
+
* @param {number} value - number of pixels
|
|
35
35
|
* @returns {string}
|
|
36
36
|
*/
|
|
37
37
|
|
|
@@ -91,7 +91,10 @@ var spacing06 = miniUnits(3);
|
|
|
91
91
|
var spacing07 = miniUnits(4);
|
|
92
92
|
var spacing08 = miniUnits(5);
|
|
93
93
|
var spacing09 = miniUnits(6);
|
|
94
|
-
var
|
|
94
|
+
var spacing10 = miniUnits(8);
|
|
95
|
+
var spacing11 = miniUnits(10);
|
|
96
|
+
var spacing12 = miniUnits(12);
|
|
97
|
+
var spacing = [spacing01, spacing02, spacing03, spacing04, spacing05, spacing06, spacing07, spacing08, spacing09, spacing10, spacing11, spacing12]; // Layout
|
|
95
98
|
|
|
96
99
|
var layout01 = miniUnits(2);
|
|
97
100
|
var layout02 = miniUnits(3);
|
|
@@ -121,6 +124,9 @@ exports.spacing06 = spacing06;
|
|
|
121
124
|
exports.spacing07 = spacing07;
|
|
122
125
|
exports.spacing08 = spacing08;
|
|
123
126
|
exports.spacing09 = spacing09;
|
|
127
|
+
exports.spacing10 = spacing10;
|
|
128
|
+
exports.spacing11 = spacing11;
|
|
129
|
+
exports.spacing12 = spacing12;
|
|
124
130
|
exports.spacing = spacing;
|
|
125
131
|
exports.layout01 = layout01;
|
|
126
132
|
exports.layout02 = layout02;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/layout",
|
|
3
3
|
"description": "Layout helpers for digital and software products using the Carbon Design System",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.2.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "yarn clean && bundler bundle src/index.js --name CarbonLayout",
|
|
22
|
+
"build": "yarn clean && bundler bundle src/index.js --name CarbonLayout && bundler sassdoc 'scss/*.scss'",
|
|
23
23
|
"clean": "rimraf es lib umd"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@carbon/bundler": "10.
|
|
26
|
+
"@carbon/bundler": "10.2.0",
|
|
27
27
|
"rimraf": "^2.6.2"
|
|
28
28
|
},
|
|
29
29
|
"eyeglass": {
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"sassDir": "scss",
|
|
33
33
|
"needs": "^1.3.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "e71825a0cf44f6f41fee7d2b0dd9c57d7bda126a"
|
|
36
36
|
}
|
package/scss/_breakpoint.scss
CHANGED
|
@@ -9,10 +9,22 @@
|
|
|
9
9
|
@import 'convert';
|
|
10
10
|
@import 'utilities';
|
|
11
11
|
|
|
12
|
+
/// Carbon gutter size in rem
|
|
13
|
+
/// @type Number
|
|
14
|
+
/// @access public
|
|
15
|
+
/// @group @carbon/layout
|
|
12
16
|
$carbon--grid-gutter: carbon--rem(32px);
|
|
17
|
+
|
|
18
|
+
/// Carbon condensed gutter size in rem
|
|
19
|
+
/// @type Number
|
|
20
|
+
/// @access public
|
|
21
|
+
/// @group @carbon/layout
|
|
13
22
|
$carbon--grid-gutter--condensed: carbon--rem(2px);
|
|
14
23
|
|
|
15
24
|
// Initial map of our breakpoints and their values
|
|
25
|
+
/// @type Map
|
|
26
|
+
/// @access public
|
|
27
|
+
/// @group @carbon/layout
|
|
16
28
|
$carbon--grid-breakpoints: (
|
|
17
29
|
sm: (
|
|
18
30
|
columns: 4,
|
|
@@ -41,12 +53,13 @@ $carbon--grid-breakpoints: (
|
|
|
41
53
|
),
|
|
42
54
|
) !default;
|
|
43
55
|
|
|
44
|
-
/// Get the value of the next breakpoint, or null for the last breakpoint
|
|
45
|
-
/// @param {String} $name -
|
|
46
|
-
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] -
|
|
47
|
-
///
|
|
48
|
-
/// @
|
|
49
|
-
/// @
|
|
56
|
+
/// Get the value of the next breakpoint, or null for the last breakpoint
|
|
57
|
+
/// @param {String} $name - The name of the brekapoint
|
|
58
|
+
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint
|
|
59
|
+
/// @param {List} $breakpoint-names [map-keys($breakpoints)] - A list of names from the `$breakpoints` map
|
|
60
|
+
/// @return {String}
|
|
61
|
+
/// @access public
|
|
62
|
+
/// @group @carbon/layout
|
|
50
63
|
@function carbon--breakpoint-next(
|
|
51
64
|
$name,
|
|
52
65
|
$breakpoints: $carbon--grid-breakpoints,
|
|
@@ -59,6 +72,13 @@ $carbon--grid-breakpoints: (
|
|
|
59
72
|
@return null;
|
|
60
73
|
}
|
|
61
74
|
|
|
75
|
+
/// Get the value of the previous breakpoint, or null for the first breakpoint
|
|
76
|
+
/// @param {String} $name - The name of the brekapoint
|
|
77
|
+
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint
|
|
78
|
+
/// @param {List} $breakpoint-names [map-keys($breakpoints)] - A list of names from the `$breakpoints` map
|
|
79
|
+
/// @return {String}
|
|
80
|
+
/// @access public
|
|
81
|
+
/// @group @carbon/layout
|
|
62
82
|
@function carbon--breakpoint-prev(
|
|
63
83
|
$name,
|
|
64
84
|
$breakpoints: $carbon--grid-breakpoints,
|
|
@@ -72,6 +92,11 @@ $carbon--grid-breakpoints: (
|
|
|
72
92
|
}
|
|
73
93
|
|
|
74
94
|
/// Check to see if the given breakpoint name
|
|
95
|
+
/// @param {String} $name - The name of the brekapoint
|
|
96
|
+
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint
|
|
97
|
+
/// @return {Bool}
|
|
98
|
+
/// @access public
|
|
99
|
+
/// @group @carbon/layout
|
|
75
100
|
@function carbon--is-smallest-breakpoint(
|
|
76
101
|
$name,
|
|
77
102
|
$breakpoints: $carbon--grid-breakpoints
|
|
@@ -79,9 +104,11 @@ $carbon--grid-breakpoints: (
|
|
|
79
104
|
@return index(map-keys($breakpoints), $name) == 1;
|
|
80
105
|
}
|
|
81
106
|
|
|
82
|
-
///
|
|
83
|
-
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] -
|
|
84
|
-
/// @
|
|
107
|
+
/// Returns the largest breakpoint name
|
|
108
|
+
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - A map of breakpoints where the key is the name
|
|
109
|
+
/// @return {String}
|
|
110
|
+
/// @access public
|
|
111
|
+
/// @group @carbon/layout
|
|
85
112
|
@function carbon--largest-breakpoint-name(
|
|
86
113
|
$breakpoints: $carbon--grid-breakpoints
|
|
87
114
|
) {
|
|
@@ -89,18 +116,21 @@ $carbon--grid-breakpoints: (
|
|
|
89
116
|
@return carbon--key-by-index($breakpoints, $total-breakpoints);
|
|
90
117
|
}
|
|
91
118
|
|
|
92
|
-
/// Get the infix for a given breakpoint in a list of breakpoints. Usesful for
|
|
93
|
-
///
|
|
94
|
-
/// @
|
|
95
|
-
/// @
|
|
119
|
+
/// Get the infix for a given breakpoint in a list of breakpoints. Usesful for generate the size part in a selector, for example: `.prefix--col-sm-2`.
|
|
120
|
+
/// @param {String} $name - The name of the breakpoint
|
|
121
|
+
/// @return {String}
|
|
122
|
+
/// @access public
|
|
123
|
+
/// @group @carbon/layout
|
|
96
124
|
@function carbon--breakpoint-infix($name) {
|
|
97
125
|
@return '-#{$name}';
|
|
98
126
|
}
|
|
99
127
|
|
|
100
128
|
/// Generate a media query up to the width of the given breakpoint name
|
|
101
|
-
/// @param {
|
|
102
|
-
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] -
|
|
129
|
+
/// @param {String | Number} $name
|
|
130
|
+
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - A map of breakpoints where the key is the name
|
|
103
131
|
/// @content
|
|
132
|
+
/// @access public
|
|
133
|
+
/// @group @carbon/layout
|
|
104
134
|
@mixin carbon--breakpoint-up($name, $breakpoints: $carbon--grid-breakpoints) {
|
|
105
135
|
@if type-of($name) == 'number' {
|
|
106
136
|
@media (min-width: $name) {
|
|
@@ -122,9 +152,11 @@ $carbon--grid-breakpoints: (
|
|
|
122
152
|
}
|
|
123
153
|
|
|
124
154
|
/// Generate a media query for the maximum width of the given styles
|
|
125
|
-
/// @param {
|
|
126
|
-
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] -
|
|
155
|
+
/// @param {String | Number} $name
|
|
156
|
+
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - A map of breakpoints where the key is the name
|
|
127
157
|
/// @content
|
|
158
|
+
/// @access public
|
|
159
|
+
/// @group @carbon/layout
|
|
128
160
|
@mixin carbon--breakpoint-down($name, $breakpoints: $carbon--grid-breakpoints) {
|
|
129
161
|
@if type-of($name) == 'number' {
|
|
130
162
|
@media (max-width: $name) {
|
|
@@ -145,11 +177,13 @@ $carbon--grid-breakpoints: (
|
|
|
145
177
|
}
|
|
146
178
|
}
|
|
147
179
|
|
|
148
|
-
/// Generate a media query for the range between the lower and upper
|
|
149
|
-
///
|
|
150
|
-
/// @param {
|
|
151
|
-
/// @param {
|
|
180
|
+
/// Generate a media query for the range between the lower and upper breakpoints
|
|
181
|
+
/// @param {String | Number} $lower
|
|
182
|
+
/// @param {String | Number} $upper
|
|
183
|
+
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - A map of breakpoints where the key is the name
|
|
152
184
|
/// @content
|
|
185
|
+
/// @access public
|
|
186
|
+
/// @group @carbon/layout
|
|
153
187
|
@mixin carbon--breakpoint-between(
|
|
154
188
|
$lower,
|
|
155
189
|
$upper,
|
|
@@ -179,9 +213,11 @@ $carbon--grid-breakpoints: (
|
|
|
179
213
|
}
|
|
180
214
|
}
|
|
181
215
|
|
|
182
|
-
///
|
|
183
|
-
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] -
|
|
216
|
+
/// Generate media query for the largest breakpoint
|
|
217
|
+
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - A map of breakpoints where the key is the name
|
|
184
218
|
/// @content
|
|
219
|
+
/// @access public
|
|
220
|
+
/// @group @carbon/layout
|
|
185
221
|
@mixin carbon--largest-breakpoint($breakpoints: $carbon--grid-breakpoints) {
|
|
186
222
|
@include carbon--breakpoint(carbon--largest-breakpoint-name()) {
|
|
187
223
|
@content;
|
|
@@ -189,9 +225,11 @@ $carbon--grid-breakpoints: (
|
|
|
189
225
|
}
|
|
190
226
|
|
|
191
227
|
/// Generate a media query for a given breakpoint
|
|
192
|
-
/// @param {
|
|
193
|
-
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] -
|
|
228
|
+
/// @param {String | Number} $name
|
|
229
|
+
/// @param {Map} $breakpoints [$carbon--grid-breakpoints] - A map of breakpoints where the key is the name
|
|
194
230
|
/// @content
|
|
231
|
+
/// @access public
|
|
232
|
+
/// @group @carbon/layout
|
|
195
233
|
@mixin carbon--breakpoint($name, $breakpoints: $carbon--grid-breakpoints) {
|
|
196
234
|
@include carbon--breakpoint-up($name, $breakpoints) {
|
|
197
235
|
@content;
|
package/scss/_convert.scss
CHANGED
|
@@ -5,19 +5,26 @@
|
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
/// Default font size
|
|
9
|
+
/// @type Number
|
|
10
|
+
/// @access public
|
|
11
|
+
/// @group @carbon/layout
|
|
9
12
|
$carbon--base-font-size: 16px !default;
|
|
10
13
|
|
|
11
14
|
/// Convert a given px unit to a rem unit
|
|
12
|
-
/// @param {
|
|
13
|
-
/// @return {rem
|
|
15
|
+
/// @param {Number} $px - Number with px unit
|
|
16
|
+
/// @return {Number} Number with rem unit
|
|
17
|
+
/// @access public
|
|
18
|
+
/// @group @carbon/layout
|
|
14
19
|
@function carbon--rem($px) {
|
|
15
20
|
@return ($px / $carbon--base-font-size) * 1rem;
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
/// Convert a given px unit to a em unit
|
|
19
|
-
/// @param {
|
|
20
|
-
/// @return {em
|
|
24
|
+
/// @param {Number} $px - Number with px unit
|
|
25
|
+
/// @return {Number} Number with em unit
|
|
26
|
+
/// @access public
|
|
27
|
+
/// @group @carbon/layout
|
|
21
28
|
@function carbon--em($px) {
|
|
22
29
|
@return ($px / $carbon--base-font-size) * 1em;
|
|
23
30
|
}
|
package/scss/_key-height.scss
CHANGED
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
@import 'breakpoint';
|
|
9
9
|
@import 'utilities';
|
|
10
10
|
|
|
11
|
-
/// Get the column width for a given breakpoint
|
|
12
|
-
///
|
|
13
|
-
/// @param {
|
|
14
|
-
/// @return rem
|
|
11
|
+
/// Get the column width for a given breakpoint
|
|
12
|
+
/// @param {String} $breakpoint
|
|
13
|
+
/// @param {Map} $breakpoints [$carbon--grid-breakpoints]
|
|
14
|
+
/// @return {Number} In rem
|
|
15
|
+
/// @access public
|
|
16
|
+
/// @group @carbon/layout
|
|
15
17
|
@function carbon--get-column-width(
|
|
16
18
|
$breakpoint,
|
|
17
19
|
$breakpoints: $carbon--grid-breakpoints
|
|
@@ -28,6 +30,9 @@
|
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
|
|
33
|
+
/// @type Map
|
|
34
|
+
/// @access public
|
|
35
|
+
/// @group @carbon/layout
|
|
31
36
|
$carbon--key-height-scales: (
|
|
32
37
|
sm: (
|
|
33
38
|
carbon--get-column-width(sm),
|
|
@@ -78,9 +83,11 @@ $carbon--key-height-scales: (
|
|
|
78
83
|
);
|
|
79
84
|
|
|
80
85
|
/// Get the value of a key height step at a given breakpoint
|
|
81
|
-
/// @param {
|
|
82
|
-
/// @param {
|
|
83
|
-
/// @return rem
|
|
86
|
+
/// @param {String} $breakpoint
|
|
87
|
+
/// @param {Number} $step
|
|
88
|
+
/// @return {Number} In rem
|
|
89
|
+
/// @access public
|
|
90
|
+
/// @group @carbon/layout
|
|
84
91
|
@function carbon--key-height($breakpoint, $step) {
|
|
85
92
|
@if map-has-key($carbon--key-height-scales, $breakpoint) {
|
|
86
93
|
@return nth(map-get($carbon--key-height-scales, $breakpoint), $step);
|
package/scss/_mini-unit.scss
CHANGED
|
@@ -7,12 +7,17 @@
|
|
|
7
7
|
|
|
8
8
|
@import 'convert';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
/// Default mini-unit value
|
|
11
|
+
/// @type Number
|
|
12
|
+
/// @access public
|
|
13
|
+
/// @group @carbon/layout
|
|
11
14
|
$carbon--mini-unit-size: 8px !default;
|
|
12
15
|
|
|
13
16
|
/// Get the value of the corresponding number of units
|
|
14
|
-
/// @param {
|
|
15
|
-
/// @return rem
|
|
17
|
+
/// @param {Number} $count - The number of units to get the value for
|
|
18
|
+
/// @return {Number} In rem units
|
|
19
|
+
/// @access public
|
|
20
|
+
/// @group @carbon/layout
|
|
16
21
|
@function carbon--mini-units($count) {
|
|
17
22
|
@return carbon--rem($carbon--mini-unit-size * $count);
|
|
18
23
|
}
|
package/scss/_spacing.scss
CHANGED
|
@@ -7,49 +7,322 @@
|
|
|
7
7
|
|
|
8
8
|
@import 'mini-unit';
|
|
9
9
|
|
|
10
|
+
/// 0.125rem (2px) spacing with default mini unit
|
|
11
|
+
/// @type Number
|
|
12
|
+
/// @access public
|
|
13
|
+
/// @group @carbon/layout
|
|
10
14
|
$carbon--spacing-01: carbon--mini-units(0.25) !default;
|
|
15
|
+
|
|
16
|
+
/// 0.25rem (4px) spacing with default mini unit
|
|
17
|
+
/// @type Number
|
|
18
|
+
/// @access public
|
|
19
|
+
/// @group @carbon/layout
|
|
11
20
|
$carbon--spacing-02: carbon--mini-units(0.5) !default;
|
|
21
|
+
|
|
22
|
+
/// 0.5rem (8px) spacing with default mini unit
|
|
23
|
+
/// @type Number
|
|
24
|
+
/// @access public
|
|
25
|
+
/// @group @carbon/layout
|
|
12
26
|
$carbon--spacing-03: carbon--mini-units(1) !default;
|
|
27
|
+
|
|
28
|
+
/// 0.75rem (12px) spacing with default mini unit
|
|
29
|
+
/// @type Number
|
|
30
|
+
/// @access public
|
|
31
|
+
/// @group @carbon/layout
|
|
13
32
|
$carbon--spacing-04: carbon--mini-units(1.5) !default;
|
|
33
|
+
|
|
34
|
+
/// 1rem (16px) spacing with default mini unit
|
|
35
|
+
/// @type Number
|
|
36
|
+
/// @access public
|
|
37
|
+
/// @group @carbon/layout
|
|
14
38
|
$carbon--spacing-05: carbon--mini-units(2) !default;
|
|
39
|
+
|
|
40
|
+
/// 1.5rem (24px) spacing with default mini unit
|
|
41
|
+
/// @type Number
|
|
42
|
+
/// @access public
|
|
43
|
+
/// @group @carbon/layout
|
|
15
44
|
$carbon--spacing-06: carbon--mini-units(3) !default;
|
|
45
|
+
|
|
46
|
+
/// 2rem (32px) spacing with default mini unit
|
|
47
|
+
/// @type Number
|
|
48
|
+
/// @access public
|
|
49
|
+
/// @group @carbon/layout
|
|
16
50
|
$carbon--spacing-07: carbon--mini-units(4) !default;
|
|
51
|
+
|
|
52
|
+
/// 2.5rem (40px) spacing with default mini unit
|
|
53
|
+
/// @type Number
|
|
54
|
+
/// @access public
|
|
55
|
+
/// @group @carbon/layout
|
|
17
56
|
$carbon--spacing-08: carbon--mini-units(5) !default;
|
|
57
|
+
|
|
58
|
+
/// 3rem (48px) spacing with default mini unit
|
|
59
|
+
/// @type Number
|
|
60
|
+
/// @access public
|
|
61
|
+
/// @group @carbon/layout
|
|
18
62
|
$carbon--spacing-09: carbon--mini-units(6) !default;
|
|
19
63
|
|
|
64
|
+
/// 4rem (64px) spacing with default mini unit
|
|
65
|
+
/// @type Number
|
|
66
|
+
/// @access public
|
|
67
|
+
/// @group @carbon/layout
|
|
68
|
+
$carbon--spacing-10: carbon--mini-units(8) !default;
|
|
69
|
+
|
|
70
|
+
/// 5rem (80px) spacing with default mini unit
|
|
71
|
+
/// @type Number
|
|
72
|
+
/// @access public
|
|
73
|
+
/// @group @carbon/layout
|
|
74
|
+
$carbon--spacing-11: carbon--mini-units(10) !default;
|
|
75
|
+
|
|
76
|
+
/// 6rem (96px) spacing with default mini unit
|
|
77
|
+
/// @type Number
|
|
78
|
+
/// @access public
|
|
79
|
+
/// @group @carbon/layout
|
|
80
|
+
$carbon--spacing-12: carbon--mini-units(12) !default;
|
|
81
|
+
|
|
82
|
+
/// All spacing increments in a map
|
|
83
|
+
/// @type Map
|
|
84
|
+
/// @access public
|
|
85
|
+
/// @group @carbon/layout
|
|
86
|
+
$carbon--spacing: (
|
|
87
|
+
$carbon--spacing-01,
|
|
88
|
+
$carbon--spacing-02,
|
|
89
|
+
$carbon--spacing-03,
|
|
90
|
+
$carbon--spacing-04,
|
|
91
|
+
$carbon--spacing-05,
|
|
92
|
+
$carbon--spacing-06,
|
|
93
|
+
$carbon--spacing-07,
|
|
94
|
+
$carbon--spacing-08,
|
|
95
|
+
$carbon--spacing-09,
|
|
96
|
+
$carbon--spacing-10,
|
|
97
|
+
$carbon--spacing-11,
|
|
98
|
+
$carbon--spacing-12
|
|
99
|
+
) !default;
|
|
100
|
+
|
|
101
|
+
/// @type Number
|
|
102
|
+
/// @access public
|
|
103
|
+
/// @group @carbon/layout
|
|
104
|
+
/// @alias carbon--spacing-01
|
|
20
105
|
$spacing-01: $carbon--spacing-01 !default;
|
|
106
|
+
|
|
107
|
+
/// @type Number
|
|
108
|
+
/// @access public
|
|
109
|
+
/// @group @carbon/layout
|
|
110
|
+
/// @alias carbon--spacing-02
|
|
21
111
|
$spacing-02: $carbon--spacing-02 !default;
|
|
112
|
+
|
|
113
|
+
/// @type Number
|
|
114
|
+
/// @access public
|
|
115
|
+
/// @group @carbon/layout
|
|
116
|
+
/// @alias carbon--spacing-03
|
|
22
117
|
$spacing-03: $carbon--spacing-03 !default;
|
|
118
|
+
|
|
119
|
+
/// @type Number
|
|
120
|
+
/// @access public
|
|
121
|
+
/// @group @carbon/layout
|
|
122
|
+
/// @alias carbon--spacing-04
|
|
23
123
|
$spacing-04: $carbon--spacing-04 !default;
|
|
124
|
+
|
|
125
|
+
/// @type Number
|
|
126
|
+
/// @access public
|
|
127
|
+
/// @group @carbon/layout
|
|
128
|
+
/// @alias carbon--spacing-05
|
|
24
129
|
$spacing-05: $carbon--spacing-05 !default;
|
|
130
|
+
|
|
131
|
+
/// @type Number
|
|
132
|
+
/// @access public
|
|
133
|
+
/// @group @carbon/layout
|
|
134
|
+
/// @alias carbon--spacing-06
|
|
25
135
|
$spacing-06: $carbon--spacing-06 !default;
|
|
136
|
+
|
|
137
|
+
/// @type Number
|
|
138
|
+
/// @access public
|
|
139
|
+
/// @group @carbon/layout
|
|
140
|
+
/// @alias carbon--spacing-07
|
|
26
141
|
$spacing-07: $carbon--spacing-07 !default;
|
|
142
|
+
|
|
143
|
+
/// @type Number
|
|
144
|
+
/// @access public
|
|
145
|
+
/// @group @carbon/layout
|
|
146
|
+
/// @alias carbon--spacing-08
|
|
27
147
|
$spacing-08: $carbon--spacing-08 !default;
|
|
148
|
+
|
|
149
|
+
/// @type Number
|
|
150
|
+
/// @access public
|
|
151
|
+
/// @group @carbon/layout
|
|
152
|
+
/// @alias carbon--spacing-09
|
|
28
153
|
$spacing-09: $carbon--spacing-09 !default;
|
|
29
154
|
|
|
155
|
+
/// @type Number
|
|
156
|
+
/// @access public
|
|
157
|
+
/// @group @carbon/layout
|
|
158
|
+
/// @alias carbon--spacing-10
|
|
159
|
+
$spacing-10: $carbon--spacing-10 !default;
|
|
160
|
+
|
|
161
|
+
/// @type Number
|
|
162
|
+
/// @access public
|
|
163
|
+
/// @group @carbon/layout
|
|
164
|
+
/// @alias carbon--spacing-11
|
|
165
|
+
$spacing-11: $carbon--spacing-11 !default;
|
|
166
|
+
|
|
167
|
+
/// @type Number
|
|
168
|
+
/// @access public
|
|
169
|
+
/// @group @carbon/layout
|
|
170
|
+
/// @alias carbon--spacing-12
|
|
171
|
+
$spacing-12: $carbon--spacing-12 !default;
|
|
172
|
+
|
|
173
|
+
/// 1rem (16px) layout with default mini unit
|
|
174
|
+
/// @type Number
|
|
175
|
+
/// @access public
|
|
176
|
+
/// @group @carbon/layout
|
|
30
177
|
$carbon--layout-01: carbon--mini-units(2) !default;
|
|
178
|
+
|
|
179
|
+
/// 1.5rem (24px) layout with default mini unit
|
|
180
|
+
/// @type Number
|
|
181
|
+
/// @access public
|
|
182
|
+
/// @group @carbon/layout
|
|
31
183
|
$carbon--layout-02: carbon--mini-units(3) !default;
|
|
184
|
+
|
|
185
|
+
/// 2rem (32px) layout with default mini unit
|
|
186
|
+
/// @type Number
|
|
187
|
+
/// @access public
|
|
188
|
+
/// @group @carbon/layout
|
|
32
189
|
$carbon--layout-03: carbon--mini-units(4) !default;
|
|
190
|
+
|
|
191
|
+
/// 3rem (48px) layout with default mini unit
|
|
192
|
+
/// @type Number
|
|
193
|
+
/// @access public
|
|
194
|
+
/// @group @carbon/layout
|
|
33
195
|
$carbon--layout-04: carbon--mini-units(6) !default;
|
|
196
|
+
|
|
197
|
+
/// 4rem (64px) layout with default mini unit
|
|
198
|
+
/// @type Number
|
|
199
|
+
/// @access public
|
|
200
|
+
/// @group @carbon/layout
|
|
34
201
|
$carbon--layout-05: carbon--mini-units(8) !default;
|
|
202
|
+
|
|
203
|
+
/// 4rem (96px) layout with default mini unit
|
|
204
|
+
/// @type Number
|
|
205
|
+
/// @access public
|
|
206
|
+
/// @group @carbon/layout
|
|
35
207
|
$carbon--layout-06: carbon--mini-units(12) !default;
|
|
208
|
+
|
|
209
|
+
/// 10rem (160px) layout with default mini unit
|
|
210
|
+
/// @type Number
|
|
211
|
+
/// @access public
|
|
212
|
+
/// @group @carbon/layout
|
|
36
213
|
$carbon--layout-07: carbon--mini-units(20) !default;
|
|
37
214
|
|
|
215
|
+
/// All layout increments in a map
|
|
216
|
+
/// @type Map
|
|
217
|
+
/// @access public
|
|
218
|
+
/// @group @carbon/layout
|
|
219
|
+
$carbon--layout: (
|
|
220
|
+
$carbon--layout-01,
|
|
221
|
+
$carbon--layout-02,
|
|
222
|
+
$carbon--layout-03,
|
|
223
|
+
$carbon--layout-04,
|
|
224
|
+
$carbon--layout-05,
|
|
225
|
+
$carbon--layout-06,
|
|
226
|
+
$carbon--layout-07
|
|
227
|
+
) !default;
|
|
228
|
+
|
|
229
|
+
/// @type Number
|
|
230
|
+
/// @access public
|
|
231
|
+
/// @group @carbon/layout
|
|
232
|
+
/// @alias carbon--layout-01
|
|
38
233
|
$layout-01: $carbon--layout-01 !default;
|
|
234
|
+
|
|
235
|
+
/// @type Number
|
|
236
|
+
/// @access public
|
|
237
|
+
/// @group @carbon/layout
|
|
238
|
+
/// @alias carbon--layout-02
|
|
39
239
|
$layout-02: $carbon--layout-02 !default;
|
|
240
|
+
|
|
241
|
+
/// @type Number
|
|
242
|
+
/// @access public
|
|
243
|
+
/// @group @carbon/layout
|
|
244
|
+
/// @alias carbon--layout-03
|
|
40
245
|
$layout-03: $carbon--layout-03 !default;
|
|
246
|
+
|
|
247
|
+
/// @type Number
|
|
248
|
+
/// @access public
|
|
249
|
+
/// @group @carbon/layout
|
|
250
|
+
/// @alias carbon--layout-04
|
|
41
251
|
$layout-04: $carbon--layout-04 !default;
|
|
252
|
+
|
|
253
|
+
/// @type Number
|
|
254
|
+
/// @access public
|
|
255
|
+
/// @group @carbon/layout
|
|
256
|
+
/// @alias carbon--layout-05
|
|
42
257
|
$layout-05: $carbon--layout-05 !default;
|
|
258
|
+
|
|
259
|
+
/// @type Number
|
|
260
|
+
/// @access public
|
|
261
|
+
/// @group @carbon/layout
|
|
262
|
+
/// @alias carbon--layout-06
|
|
43
263
|
$layout-06: $carbon--layout-06 !default;
|
|
264
|
+
|
|
265
|
+
/// @type Number
|
|
266
|
+
/// @access public
|
|
267
|
+
/// @group @carbon/layout
|
|
268
|
+
/// @alias carbon--layout-07
|
|
44
269
|
$layout-07: $carbon--layout-07 !default;
|
|
45
270
|
|
|
46
|
-
|
|
271
|
+
/// 0vw fluid spacing
|
|
272
|
+
/// @type Number
|
|
273
|
+
/// @access public
|
|
274
|
+
/// @group @carbon/layout
|
|
47
275
|
$carbon--fluid-spacing-01: 0;
|
|
276
|
+
|
|
277
|
+
/// 2vw fluid spacing
|
|
278
|
+
/// @type Number
|
|
279
|
+
/// @access public
|
|
280
|
+
/// @group @carbon/layout
|
|
48
281
|
$carbon--fluid-spacing-02: 2vw;
|
|
282
|
+
|
|
283
|
+
/// 5vw fluid spacing
|
|
284
|
+
/// @type Number
|
|
285
|
+
/// @access public
|
|
286
|
+
/// @group @carbon/layout
|
|
49
287
|
$carbon--fluid-spacing-03: 5vw;
|
|
288
|
+
|
|
289
|
+
/// 10vw fluid spacing
|
|
290
|
+
/// @type Number
|
|
291
|
+
/// @access public
|
|
292
|
+
/// @group @carbon/layout
|
|
50
293
|
$carbon--fluid-spacing-04: 10vw;
|
|
51
294
|
|
|
295
|
+
/// All fluid spacing increments in a map
|
|
296
|
+
/// @type Map
|
|
297
|
+
/// @access public
|
|
298
|
+
/// @group @carbon/layout
|
|
299
|
+
$carbon--fluid-spacing: (
|
|
300
|
+
$carbon--fluid-spacing-01,
|
|
301
|
+
$carbon--fluid-spacing-02,
|
|
302
|
+
$carbon--fluid-spacing-03,
|
|
303
|
+
$carbon--fluid-spacing-04
|
|
304
|
+
) !default;
|
|
305
|
+
|
|
306
|
+
/// @type Number
|
|
307
|
+
/// @access public
|
|
308
|
+
/// @group @carbon/layout
|
|
309
|
+
/// @alias carbon--fluid-spacing-01
|
|
52
310
|
$fluid-spacing-01: $carbon--fluid-spacing-01 !default;
|
|
311
|
+
|
|
312
|
+
/// @type Number
|
|
313
|
+
/// @access public
|
|
314
|
+
/// @group @carbon/layout
|
|
315
|
+
/// @alias carbon--fluid-spacing-02
|
|
53
316
|
$fluid-spacing-02: $carbon--fluid-spacing-02 !default;
|
|
317
|
+
|
|
318
|
+
/// @type Number
|
|
319
|
+
/// @access public
|
|
320
|
+
/// @group @carbon/layout
|
|
321
|
+
/// @alias carbon--fluid-spacing-03
|
|
54
322
|
$fluid-spacing-03: $carbon--fluid-spacing-03 !default;
|
|
323
|
+
|
|
324
|
+
/// @type Number
|
|
325
|
+
/// @access public
|
|
326
|
+
/// @group @carbon/layout
|
|
327
|
+
/// @alias carbon--fluid-spacing-04
|
|
55
328
|
$fluid-spacing-04: $carbon--fluid-spacing-04 !default;
|