@carbon/elements 10.56.1 → 10.56.3
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/package.json +10 -10
- package/scss/grid/modules/_config.scss +11 -11
- package/scss/grid/vendor/@carbon/layout/_breakpoint.scss +11 -11
- package/scss/grid/vendor/@carbon/layout/_convert.import.scss +20 -1
- package/scss/grid/vendor/@carbon/layout/_convert.scss +17 -1
- package/scss/grid/vendor/@carbon/layout/_mini-unit.scss +1 -1
- package/scss/grid/vendor/@carbon/layout/modules/_convert.scss +20 -0
- package/scss/layout/_breakpoint.scss +11 -11
- package/scss/layout/_convert.import.scss +20 -1
- package/scss/layout/_convert.scss +17 -1
- package/scss/layout/_mini-unit.scss +1 -1
- package/scss/layout/modules/_convert.scss +20 -0
- package/scss/type/_inlined/_scale.scss +1 -1
- package/scss/type/_scale.scss +1 -1
- package/scss/type/modules/_scale.scss +1 -1
- package/scss/type/vendor/@carbon/grid/modules/_config.scss +11 -11
- package/scss/type/vendor/@carbon/grid/vendor/@carbon/layout/_breakpoint.scss +11 -11
- package/scss/type/vendor/@carbon/grid/vendor/@carbon/layout/_convert.import.scss +20 -1
- package/scss/type/vendor/@carbon/grid/vendor/@carbon/layout/_convert.scss +17 -1
- package/scss/type/vendor/@carbon/grid/vendor/@carbon/layout/_mini-unit.scss +1 -1
- package/scss/type/vendor/@carbon/grid/vendor/@carbon/layout/modules/_convert.scss +20 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/elements",
|
|
3
3
|
"description": "A collection of design elements in code for the IBM Design Language",
|
|
4
|
-
"version": "10.56.
|
|
4
|
+
"version": "10.56.3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
"clean": "rimraf es lib umd && node tasks/clean.js"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@carbon/colors": "^10.37.
|
|
39
|
-
"@carbon/grid": "^10.43.
|
|
40
|
-
"@carbon/icons": "^10.48.
|
|
38
|
+
"@carbon/colors": "^10.37.2",
|
|
39
|
+
"@carbon/grid": "^10.43.2",
|
|
40
|
+
"@carbon/icons": "^10.48.2",
|
|
41
41
|
"@carbon/import-once": "^10.7.0",
|
|
42
|
-
"@carbon/layout": "^10.37.
|
|
43
|
-
"@carbon/motion": "^10.29.
|
|
44
|
-
"@carbon/themes": "^10.55.
|
|
45
|
-
"@carbon/type": "^10.45.
|
|
42
|
+
"@carbon/layout": "^10.37.2",
|
|
43
|
+
"@carbon/motion": "^10.29.2",
|
|
44
|
+
"@carbon/themes": "^10.55.3",
|
|
45
|
+
"@carbon/type": "^10.45.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@carbon/cli": "^10.34.
|
|
48
|
+
"@carbon/cli": "^10.34.2",
|
|
49
49
|
"fs-extra": "^10.0.0",
|
|
50
50
|
"klaw-sync": "^6.0.0",
|
|
51
51
|
"replace-in-file": "^3.4.2",
|
|
52
52
|
"rimraf": "^3.0.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "58041d7d41b49eb391ccd4ac4eaf635c923aab84"
|
|
55
55
|
}
|
|
@@ -24,13 +24,13 @@ $flex-grid-columns: 16 !default;
|
|
|
24
24
|
/// @type Number
|
|
25
25
|
/// @access public
|
|
26
26
|
/// @group @carbon/layout
|
|
27
|
-
$grid-gutter: convert.rem(32px) !default;
|
|
27
|
+
$grid-gutter: convert.to-rem(32px) !default;
|
|
28
28
|
|
|
29
29
|
/// Carbon condensed gutter size in rem
|
|
30
30
|
/// @type Number
|
|
31
31
|
/// @access public
|
|
32
32
|
/// @group @carbon/layout
|
|
33
|
-
$grid-gutter-condensed: convert.rem(1px) !default;
|
|
33
|
+
$grid-gutter-condensed: convert.to-rem(1px) !default;
|
|
34
34
|
|
|
35
35
|
// Initial map of our breakpoints and their values
|
|
36
36
|
/// @type Map
|
|
@@ -40,27 +40,27 @@ $grid-breakpoints: (
|
|
|
40
40
|
sm: (
|
|
41
41
|
columns: 4,
|
|
42
42
|
margin: 0,
|
|
43
|
-
width: convert.rem(320px),
|
|
43
|
+
width: convert.to-rem(320px),
|
|
44
44
|
),
|
|
45
45
|
md: (
|
|
46
46
|
columns: 8,
|
|
47
|
-
margin: convert.rem(16px),
|
|
48
|
-
width: convert.rem(672px),
|
|
47
|
+
margin: convert.to-rem(16px),
|
|
48
|
+
width: convert.to-rem(672px),
|
|
49
49
|
),
|
|
50
50
|
lg: (
|
|
51
51
|
columns: 16,
|
|
52
|
-
margin: convert.rem(16px),
|
|
53
|
-
width: convert.rem(1056px),
|
|
52
|
+
margin: convert.to-rem(16px),
|
|
53
|
+
width: convert.to-rem(1056px),
|
|
54
54
|
),
|
|
55
55
|
xlg: (
|
|
56
56
|
columns: 16,
|
|
57
|
-
margin: convert.rem(16px),
|
|
58
|
-
width: convert.rem(1312px),
|
|
57
|
+
margin: convert.to-rem(16px),
|
|
58
|
+
width: convert.to-rem(1312px),
|
|
59
59
|
),
|
|
60
60
|
max: (
|
|
61
61
|
columns: 16,
|
|
62
|
-
margin: convert.rem(24px),
|
|
63
|
-
width: convert.rem(1584px),
|
|
62
|
+
margin: convert.to-rem(24px),
|
|
63
|
+
width: convert.to-rem(1584px),
|
|
64
64
|
),
|
|
65
65
|
) !default;
|
|
66
66
|
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
/// @type Number
|
|
14
14
|
/// @access public
|
|
15
15
|
/// @group @carbon/layout
|
|
16
|
-
$carbon--grid-gutter:
|
|
16
|
+
$carbon--grid-gutter: to-rem(32px);
|
|
17
17
|
|
|
18
18
|
/// Carbon condensed gutter size in rem
|
|
19
19
|
/// @type Number
|
|
20
20
|
/// @access public
|
|
21
21
|
/// @group @carbon/layout
|
|
22
|
-
$carbon--grid-gutter--condensed:
|
|
22
|
+
$carbon--grid-gutter--condensed: to-rem(1px);
|
|
23
23
|
|
|
24
24
|
// Initial map of our breakpoints and their values
|
|
25
25
|
/// @type Map
|
|
@@ -29,27 +29,27 @@ $carbon--grid-breakpoints: (
|
|
|
29
29
|
sm: (
|
|
30
30
|
columns: 4,
|
|
31
31
|
margin: 0,
|
|
32
|
-
width:
|
|
32
|
+
width: to-rem(320px),
|
|
33
33
|
),
|
|
34
34
|
md: (
|
|
35
35
|
columns: 8,
|
|
36
|
-
margin:
|
|
37
|
-
width:
|
|
36
|
+
margin: to-rem(16px),
|
|
37
|
+
width: to-rem(672px),
|
|
38
38
|
),
|
|
39
39
|
lg: (
|
|
40
40
|
columns: 16,
|
|
41
|
-
margin:
|
|
42
|
-
width:
|
|
41
|
+
margin: to-rem(16px),
|
|
42
|
+
width: to-rem(1056px),
|
|
43
43
|
),
|
|
44
44
|
xlg: (
|
|
45
45
|
columns: 16,
|
|
46
|
-
margin:
|
|
47
|
-
width:
|
|
46
|
+
margin: to-rem(16px),
|
|
47
|
+
width: to-rem(1312px),
|
|
48
48
|
),
|
|
49
49
|
max: (
|
|
50
50
|
columns: 16,
|
|
51
|
-
margin:
|
|
52
|
-
width:
|
|
51
|
+
margin: to-rem(24px),
|
|
52
|
+
width: to-rem(1584px),
|
|
53
53
|
),
|
|
54
54
|
) !default;
|
|
55
55
|
|
|
@@ -33,7 +33,26 @@ $carbon--base-font-size: 16px !default;
|
|
|
33
33
|
/// @return {Number} Number with rem unit
|
|
34
34
|
/// @access public
|
|
35
35
|
/// @group @carbon/layout
|
|
36
|
-
@function
|
|
36
|
+
@function to-rem($px) {
|
|
37
|
+
@if unit($px) != 'px' {
|
|
38
|
+
// TODO: update to @error in v11
|
|
39
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@if meta.function-exists('div', 'math') {
|
|
43
|
+
@return math.div($px, $carbon--base-font-size) * 1rem;
|
|
44
|
+
} @else {
|
|
45
|
+
@return ($px / $carbon--base-font-size) * 1rem;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/// This function causes an error when using sass > 1.65.0
|
|
50
|
+
/// Replaced with `to-rem` function
|
|
51
|
+
/// @param {Number} $px - Number with px unit
|
|
52
|
+
/// @return {Number} Number with rem unit
|
|
53
|
+
/// @access public
|
|
54
|
+
/// @group @carbon/layout
|
|
55
|
+
@function rem($px) {
|
|
37
56
|
@if unit($px) != 'px' {
|
|
38
57
|
// TODO: update to @error in v11
|
|
39
58
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
@@ -30,7 +30,23 @@ $carbon--base-font-size: 16px !default;
|
|
|
30
30
|
/// @return {Number} Number with rem unit
|
|
31
31
|
/// @access public
|
|
32
32
|
/// @group @carbon/layout
|
|
33
|
-
@function
|
|
33
|
+
@function to-rem($px) {
|
|
34
|
+
@if unit($px) != 'px' {
|
|
35
|
+
// TODO: update to @error in v11
|
|
36
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@return ($px / $carbon--base-font-size) * 1rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// This function causes an error when using sass > 1.65.0
|
|
43
|
+
/// Replaced with `to-rem` function
|
|
44
|
+
/// @param {Number} $px - Number with px unit
|
|
45
|
+
/// @return {Number} Number with rem unit
|
|
46
|
+
/// @access public
|
|
47
|
+
/// @group @carbon/layout
|
|
48
|
+
/// @deprecated Use `to-rem()`
|
|
49
|
+
@function rem($px) {
|
|
34
50
|
@if unit($px) != 'px' {
|
|
35
51
|
// TODO: update to @error in v11
|
|
36
52
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
@@ -19,6 +19,26 @@ $base-font-size: 16px !default;
|
|
|
19
19
|
/// @return {Number} Number with rem unit
|
|
20
20
|
/// @access public
|
|
21
21
|
/// @group @carbon/layout
|
|
22
|
+
@function to-rem($px) {
|
|
23
|
+
@if unit($px) != 'px' {
|
|
24
|
+
// TODO: update to @error in v11
|
|
25
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@if meta.function-exists('div', 'math') {
|
|
29
|
+
@return math.div($px, $base-font-size) * 1rem;
|
|
30
|
+
} @else {
|
|
31
|
+
@return ($px / $base-font-size) * 1rem;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/// This function causes an error when using sass > 1.65.0
|
|
36
|
+
/// Replaced with `to-rem` function
|
|
37
|
+
/// @param {Number} $px - Number with px unit
|
|
38
|
+
/// @return {Number} Number with rem unit
|
|
39
|
+
/// @access public
|
|
40
|
+
/// @group @carbon/layout
|
|
41
|
+
/// @deprecated Use `to-rem()`
|
|
22
42
|
@function rem($px) {
|
|
23
43
|
@if unit($px) != 'px' {
|
|
24
44
|
// TODO: update to @error in v11
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
/// @type Number
|
|
14
14
|
/// @access public
|
|
15
15
|
/// @group @carbon/layout
|
|
16
|
-
$carbon--grid-gutter:
|
|
16
|
+
$carbon--grid-gutter: to-rem(32px);
|
|
17
17
|
|
|
18
18
|
/// Carbon condensed gutter size in rem
|
|
19
19
|
/// @type Number
|
|
20
20
|
/// @access public
|
|
21
21
|
/// @group @carbon/layout
|
|
22
|
-
$carbon--grid-gutter--condensed:
|
|
22
|
+
$carbon--grid-gutter--condensed: to-rem(1px);
|
|
23
23
|
|
|
24
24
|
// Initial map of our breakpoints and their values
|
|
25
25
|
/// @type Map
|
|
@@ -29,27 +29,27 @@ $carbon--grid-breakpoints: (
|
|
|
29
29
|
sm: (
|
|
30
30
|
columns: 4,
|
|
31
31
|
margin: 0,
|
|
32
|
-
width:
|
|
32
|
+
width: to-rem(320px),
|
|
33
33
|
),
|
|
34
34
|
md: (
|
|
35
35
|
columns: 8,
|
|
36
|
-
margin:
|
|
37
|
-
width:
|
|
36
|
+
margin: to-rem(16px),
|
|
37
|
+
width: to-rem(672px),
|
|
38
38
|
),
|
|
39
39
|
lg: (
|
|
40
40
|
columns: 16,
|
|
41
|
-
margin:
|
|
42
|
-
width:
|
|
41
|
+
margin: to-rem(16px),
|
|
42
|
+
width: to-rem(1056px),
|
|
43
43
|
),
|
|
44
44
|
xlg: (
|
|
45
45
|
columns: 16,
|
|
46
|
-
margin:
|
|
47
|
-
width:
|
|
46
|
+
margin: to-rem(16px),
|
|
47
|
+
width: to-rem(1312px),
|
|
48
48
|
),
|
|
49
49
|
max: (
|
|
50
50
|
columns: 16,
|
|
51
|
-
margin:
|
|
52
|
-
width:
|
|
51
|
+
margin: to-rem(24px),
|
|
52
|
+
width: to-rem(1584px),
|
|
53
53
|
),
|
|
54
54
|
) !default;
|
|
55
55
|
|
|
@@ -33,7 +33,26 @@ $carbon--base-font-size: 16px !default;
|
|
|
33
33
|
/// @return {Number} Number with rem unit
|
|
34
34
|
/// @access public
|
|
35
35
|
/// @group @carbon/layout
|
|
36
|
-
@function
|
|
36
|
+
@function to-rem($px) {
|
|
37
|
+
@if unit($px) != 'px' {
|
|
38
|
+
// TODO: update to @error in v11
|
|
39
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@if meta.function-exists('div', 'math') {
|
|
43
|
+
@return math.div($px, $carbon--base-font-size) * 1rem;
|
|
44
|
+
} @else {
|
|
45
|
+
@return ($px / $carbon--base-font-size) * 1rem;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/// This function causes an error when using sass > 1.65.0
|
|
50
|
+
/// Replaced with `to-rem` function
|
|
51
|
+
/// @param {Number} $px - Number with px unit
|
|
52
|
+
/// @return {Number} Number with rem unit
|
|
53
|
+
/// @access public
|
|
54
|
+
/// @group @carbon/layout
|
|
55
|
+
@function rem($px) {
|
|
37
56
|
@if unit($px) != 'px' {
|
|
38
57
|
// TODO: update to @error in v11
|
|
39
58
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
@@ -30,7 +30,23 @@ $carbon--base-font-size: 16px !default;
|
|
|
30
30
|
/// @return {Number} Number with rem unit
|
|
31
31
|
/// @access public
|
|
32
32
|
/// @group @carbon/layout
|
|
33
|
-
@function
|
|
33
|
+
@function to-rem($px) {
|
|
34
|
+
@if unit($px) != 'px' {
|
|
35
|
+
// TODO: update to @error in v11
|
|
36
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@return ($px / $carbon--base-font-size) * 1rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// This function causes an error when using sass > 1.65.0
|
|
43
|
+
/// Replaced with `to-rem` function
|
|
44
|
+
/// @param {Number} $px - Number with px unit
|
|
45
|
+
/// @return {Number} Number with rem unit
|
|
46
|
+
/// @access public
|
|
47
|
+
/// @group @carbon/layout
|
|
48
|
+
/// @deprecated Use `to-rem()`
|
|
49
|
+
@function rem($px) {
|
|
34
50
|
@if unit($px) != 'px' {
|
|
35
51
|
// TODO: update to @error in v11
|
|
36
52
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
@@ -19,6 +19,26 @@ $base-font-size: 16px !default;
|
|
|
19
19
|
/// @return {Number} Number with rem unit
|
|
20
20
|
/// @access public
|
|
21
21
|
/// @group @carbon/layout
|
|
22
|
+
@function to-rem($px) {
|
|
23
|
+
@if unit($px) != 'px' {
|
|
24
|
+
// TODO: update to @error in v11
|
|
25
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@if meta.function-exists('div', 'math') {
|
|
29
|
+
@return math.div($px, $base-font-size) * 1rem;
|
|
30
|
+
} @else {
|
|
31
|
+
@return ($px / $base-font-size) * 1rem;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/// This function causes an error when using sass > 1.65.0
|
|
36
|
+
/// Replaced with `to-rem` function
|
|
37
|
+
/// @param {Number} $px - Number with px unit
|
|
38
|
+
/// @return {Number} Number with rem unit
|
|
39
|
+
/// @access public
|
|
40
|
+
/// @group @carbon/layout
|
|
41
|
+
/// @deprecated Use `to-rem()`
|
|
22
42
|
@function rem($px) {
|
|
23
43
|
@if unit($px) != 'px' {
|
|
24
44
|
// TODO: update to @error in v11
|
package/scss/type/_scale.scss
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
/// @group @carbon/type
|
|
28
28
|
$type-scale: ();
|
|
29
29
|
@for $i from 1 through 23 {
|
|
30
|
-
$type-scale: list.append($type-scale, layout.rem(get-type-size($i)));
|
|
30
|
+
$type-scale: list.append($type-scale, layout.to-rem(get-type-size($i)));
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/// Get the value of a specific step in the type scale
|
|
@@ -24,13 +24,13 @@ $flex-grid-columns: 16 !default;
|
|
|
24
24
|
/// @type Number
|
|
25
25
|
/// @access public
|
|
26
26
|
/// @group @carbon/layout
|
|
27
|
-
$grid-gutter: convert.rem(32px) !default;
|
|
27
|
+
$grid-gutter: convert.to-rem(32px) !default;
|
|
28
28
|
|
|
29
29
|
/// Carbon condensed gutter size in rem
|
|
30
30
|
/// @type Number
|
|
31
31
|
/// @access public
|
|
32
32
|
/// @group @carbon/layout
|
|
33
|
-
$grid-gutter-condensed: convert.rem(1px) !default;
|
|
33
|
+
$grid-gutter-condensed: convert.to-rem(1px) !default;
|
|
34
34
|
|
|
35
35
|
// Initial map of our breakpoints and their values
|
|
36
36
|
/// @type Map
|
|
@@ -40,27 +40,27 @@ $grid-breakpoints: (
|
|
|
40
40
|
sm: (
|
|
41
41
|
columns: 4,
|
|
42
42
|
margin: 0,
|
|
43
|
-
width: convert.rem(320px),
|
|
43
|
+
width: convert.to-rem(320px),
|
|
44
44
|
),
|
|
45
45
|
md: (
|
|
46
46
|
columns: 8,
|
|
47
|
-
margin: convert.rem(16px),
|
|
48
|
-
width: convert.rem(672px),
|
|
47
|
+
margin: convert.to-rem(16px),
|
|
48
|
+
width: convert.to-rem(672px),
|
|
49
49
|
),
|
|
50
50
|
lg: (
|
|
51
51
|
columns: 16,
|
|
52
|
-
margin: convert.rem(16px),
|
|
53
|
-
width: convert.rem(1056px),
|
|
52
|
+
margin: convert.to-rem(16px),
|
|
53
|
+
width: convert.to-rem(1056px),
|
|
54
54
|
),
|
|
55
55
|
xlg: (
|
|
56
56
|
columns: 16,
|
|
57
|
-
margin: convert.rem(16px),
|
|
58
|
-
width: convert.rem(1312px),
|
|
57
|
+
margin: convert.to-rem(16px),
|
|
58
|
+
width: convert.to-rem(1312px),
|
|
59
59
|
),
|
|
60
60
|
max: (
|
|
61
61
|
columns: 16,
|
|
62
|
-
margin: convert.rem(24px),
|
|
63
|
-
width: convert.rem(1584px),
|
|
62
|
+
margin: convert.to-rem(24px),
|
|
63
|
+
width: convert.to-rem(1584px),
|
|
64
64
|
),
|
|
65
65
|
) !default;
|
|
66
66
|
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
/// @type Number
|
|
14
14
|
/// @access public
|
|
15
15
|
/// @group @carbon/layout
|
|
16
|
-
$carbon--grid-gutter:
|
|
16
|
+
$carbon--grid-gutter: to-rem(32px);
|
|
17
17
|
|
|
18
18
|
/// Carbon condensed gutter size in rem
|
|
19
19
|
/// @type Number
|
|
20
20
|
/// @access public
|
|
21
21
|
/// @group @carbon/layout
|
|
22
|
-
$carbon--grid-gutter--condensed:
|
|
22
|
+
$carbon--grid-gutter--condensed: to-rem(1px);
|
|
23
23
|
|
|
24
24
|
// Initial map of our breakpoints and their values
|
|
25
25
|
/// @type Map
|
|
@@ -29,27 +29,27 @@ $carbon--grid-breakpoints: (
|
|
|
29
29
|
sm: (
|
|
30
30
|
columns: 4,
|
|
31
31
|
margin: 0,
|
|
32
|
-
width:
|
|
32
|
+
width: to-rem(320px),
|
|
33
33
|
),
|
|
34
34
|
md: (
|
|
35
35
|
columns: 8,
|
|
36
|
-
margin:
|
|
37
|
-
width:
|
|
36
|
+
margin: to-rem(16px),
|
|
37
|
+
width: to-rem(672px),
|
|
38
38
|
),
|
|
39
39
|
lg: (
|
|
40
40
|
columns: 16,
|
|
41
|
-
margin:
|
|
42
|
-
width:
|
|
41
|
+
margin: to-rem(16px),
|
|
42
|
+
width: to-rem(1056px),
|
|
43
43
|
),
|
|
44
44
|
xlg: (
|
|
45
45
|
columns: 16,
|
|
46
|
-
margin:
|
|
47
|
-
width:
|
|
46
|
+
margin: to-rem(16px),
|
|
47
|
+
width: to-rem(1312px),
|
|
48
48
|
),
|
|
49
49
|
max: (
|
|
50
50
|
columns: 16,
|
|
51
|
-
margin:
|
|
52
|
-
width:
|
|
51
|
+
margin: to-rem(24px),
|
|
52
|
+
width: to-rem(1584px),
|
|
53
53
|
),
|
|
54
54
|
) !default;
|
|
55
55
|
|
|
@@ -33,7 +33,26 @@ $carbon--base-font-size: 16px !default;
|
|
|
33
33
|
/// @return {Number} Number with rem unit
|
|
34
34
|
/// @access public
|
|
35
35
|
/// @group @carbon/layout
|
|
36
|
-
@function
|
|
36
|
+
@function to-rem($px) {
|
|
37
|
+
@if unit($px) != 'px' {
|
|
38
|
+
// TODO: update to @error in v11
|
|
39
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@if meta.function-exists('div', 'math') {
|
|
43
|
+
@return math.div($px, $carbon--base-font-size) * 1rem;
|
|
44
|
+
} @else {
|
|
45
|
+
@return ($px / $carbon--base-font-size) * 1rem;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/// This function causes an error when using sass > 1.65.0
|
|
50
|
+
/// Replaced with `to-rem` function
|
|
51
|
+
/// @param {Number} $px - Number with px unit
|
|
52
|
+
/// @return {Number} Number with rem unit
|
|
53
|
+
/// @access public
|
|
54
|
+
/// @group @carbon/layout
|
|
55
|
+
@function rem($px) {
|
|
37
56
|
@if unit($px) != 'px' {
|
|
38
57
|
// TODO: update to @error in v11
|
|
39
58
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
@@ -30,7 +30,23 @@ $carbon--base-font-size: 16px !default;
|
|
|
30
30
|
/// @return {Number} Number with rem unit
|
|
31
31
|
/// @access public
|
|
32
32
|
/// @group @carbon/layout
|
|
33
|
-
@function
|
|
33
|
+
@function to-rem($px) {
|
|
34
|
+
@if unit($px) != 'px' {
|
|
35
|
+
// TODO: update to @error in v11
|
|
36
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@return ($px / $carbon--base-font-size) * 1rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/// This function causes an error when using sass > 1.65.0
|
|
43
|
+
/// Replaced with `to-rem` function
|
|
44
|
+
/// @param {Number} $px - Number with px unit
|
|
45
|
+
/// @return {Number} Number with rem unit
|
|
46
|
+
/// @access public
|
|
47
|
+
/// @group @carbon/layout
|
|
48
|
+
/// @deprecated Use `to-rem()`
|
|
49
|
+
@function rem($px) {
|
|
34
50
|
@if unit($px) != 'px' {
|
|
35
51
|
// TODO: update to @error in v11
|
|
36
52
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
@@ -19,6 +19,26 @@ $base-font-size: 16px !default;
|
|
|
19
19
|
/// @return {Number} Number with rem unit
|
|
20
20
|
/// @access public
|
|
21
21
|
/// @group @carbon/layout
|
|
22
|
+
@function to-rem($px) {
|
|
23
|
+
@if unit($px) != 'px' {
|
|
24
|
+
// TODO: update to @error in v11
|
|
25
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@if meta.function-exists('div', 'math') {
|
|
29
|
+
@return math.div($px, $base-font-size) * 1rem;
|
|
30
|
+
} @else {
|
|
31
|
+
@return ($px / $base-font-size) * 1rem;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/// This function causes an error when using sass > 1.65.0
|
|
36
|
+
/// Replaced with `to-rem` function
|
|
37
|
+
/// @param {Number} $px - Number with px unit
|
|
38
|
+
/// @return {Number} Number with rem unit
|
|
39
|
+
/// @access public
|
|
40
|
+
/// @group @carbon/layout
|
|
41
|
+
/// @deprecated Use `to-rem()`
|
|
22
42
|
@function rem($px) {
|
|
23
43
|
@if unit($px) != 'px' {
|
|
24
44
|
// TODO: update to @error in v11
|