@carbon/layout 10.32.0 → 10.35.0-rc.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/package.json +4 -4
- package/scss/_convert.import.scss +11 -2
- package/scss/_key-height.import.scss +6 -1
- package/scss/modules/_convert.scss +11 -2
- package/umd/index.js +2 -2
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.35.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"clean": "rimraf es lib umd scss/generated scss/modules/generated"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@carbon/cli": "^10.
|
|
32
|
+
"@carbon/cli": "^10.32.0-rc.0",
|
|
33
33
|
"@carbon/cli-reporter": "^10.5.0",
|
|
34
34
|
"@carbon/scss-generator": "^10.13.0",
|
|
35
|
-
"@carbon/test-utils": "^10.
|
|
35
|
+
"@carbon/test-utils": "^10.21.0-rc.0",
|
|
36
36
|
"core-js": "^3.16.0",
|
|
37
37
|
"rimraf": "^3.0.0"
|
|
38
38
|
},
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"sassDir": "scss",
|
|
43
43
|
"needs": "^1.3.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "a8bade7e1200220296e8ed13621c7a1a88206f0e"
|
|
46
46
|
}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// compatibility file to ensure we continue to support node-sass and dart-sass
|
|
20
20
|
// in v10.
|
|
21
21
|
|
|
22
|
+
@use 'sass:meta';
|
|
22
23
|
@use 'sass:math';
|
|
23
24
|
|
|
24
25
|
/// Default font size
|
|
@@ -38,7 +39,11 @@ $carbon--base-font-size: 16px !default;
|
|
|
38
39
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
39
40
|
}
|
|
40
41
|
|
|
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
|
+
}
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
/// Convert a given px unit to a em unit
|
|
@@ -52,5 +57,9 @@ $carbon--base-font-size: 16px !default;
|
|
|
52
57
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
53
58
|
}
|
|
54
59
|
|
|
55
|
-
@
|
|
60
|
+
@if meta.function-exists('div', 'math') {
|
|
61
|
+
@return math.div($px, $carbon--base-font-size) * 1em;
|
|
62
|
+
} @else {
|
|
63
|
+
@return ($px / $carbon--base-font-size) * 1em;
|
|
64
|
+
}
|
|
56
65
|
}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// compatibility file to ensure we continue to support node-sass and dart-sass
|
|
20
20
|
// in v10.
|
|
21
21
|
|
|
22
|
+
@use 'sass:meta';
|
|
22
23
|
@use "sass:math";
|
|
23
24
|
@import 'breakpoint'; /* stylelint-disable-line no-invalid-position-at-import-rule */
|
|
24
25
|
@import 'utilities'; /* stylelint-disable-line no-invalid-position-at-import-rule */
|
|
@@ -39,7 +40,11 @@
|
|
|
39
40
|
$margin: map-get($values, margin);
|
|
40
41
|
$columns: map-get($values, columns);
|
|
41
42
|
|
|
42
|
-
@
|
|
43
|
+
@if meta.function-exists('div', 'math') {
|
|
44
|
+
@return math.div($width - (2 * $margin), $columns);
|
|
45
|
+
} @else {
|
|
46
|
+
@return (($width - (2 * $margin)) / $columns);
|
|
47
|
+
}
|
|
43
48
|
} @else {
|
|
44
49
|
@warn 'Breakpoint: `#{$breakpoint}` is not a valid breakpoint.';
|
|
45
50
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
+
@use 'sass:meta';
|
|
8
9
|
@use 'sass:math';
|
|
9
10
|
|
|
10
11
|
/// Default font size
|
|
@@ -24,7 +25,11 @@ $base-font-size: 16px !default;
|
|
|
24
25
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
25
26
|
}
|
|
26
27
|
|
|
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
|
+
}
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
/// Convert a given px unit to a em unit
|
|
@@ -38,5 +43,9 @@ $base-font-size: 16px !default;
|
|
|
38
43
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
39
44
|
}
|
|
40
45
|
|
|
41
|
-
@
|
|
46
|
+
@if meta.function-exists('div', 'math') {
|
|
47
|
+
@return math.div($px, $base-font-size) * 1em;
|
|
48
|
+
} @else {
|
|
49
|
+
@return ($px / $base-font-size) * 1em;
|
|
50
|
+
}
|
|
42
51
|
}
|
package/umd/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.CarbonLayout = {}));
|
|
5
|
-
}(this, (function (exports) { 'use strict';
|
|
5
|
+
})(this, (function (exports) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Copyright IBM Corp. 2018, 2018
|
|
@@ -211,4 +211,4 @@
|
|
|
211
211
|
|
|
212
212
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
213
213
|
|
|
214
|
-
}))
|
|
214
|
+
}));
|