@carbon/layout 11.2.0 → 11.4.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 +5 -5
- package/scss/_convert.scss +2 -10
- package/scss/modules/_convert.scss +2 -10
- package/scss/_convert.import.scss +0 -63
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": "11.
|
|
4
|
+
"version": "11.4.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"clean": "rimraf es lib umd scss/generated"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@carbon/cli": "^11.
|
|
31
|
+
"@carbon/cli": "^11.2.0",
|
|
32
32
|
"@carbon/cli-reporter": "^10.5.0",
|
|
33
|
-
"@carbon/scss-generator": "^10.
|
|
34
|
-
"@carbon/test-utils": "^10.
|
|
33
|
+
"@carbon/scss-generator": "^10.14.0",
|
|
34
|
+
"@carbon/test-utils": "^10.25.0",
|
|
35
35
|
"core-js": "^3.16.0",
|
|
36
36
|
"rimraf": "^3.0.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "24655f8eaf108c43ac036e71360d4d3dc09a3bf4"
|
|
39
39
|
}
|
package/scss/_convert.scss
CHANGED
|
@@ -24,11 +24,7 @@ $base-font-size: 16px !default;
|
|
|
24
24
|
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@
|
|
28
|
-
@return math.div($px, $base-font-size) * 1rem;
|
|
29
|
-
} @else {
|
|
30
|
-
@return ($px / $base-font-size) * 1rem;
|
|
31
|
-
}
|
|
27
|
+
@return math.div($px, $base-font-size) * 1rem;
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
/// Convert a given px unit to a em unit
|
|
@@ -41,9 +37,5 @@ $base-font-size: 16px !default;
|
|
|
41
37
|
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
42
38
|
}
|
|
43
39
|
|
|
44
|
-
@
|
|
45
|
-
@return math.div($px, $base-font-size) * 1em;
|
|
46
|
-
} @else {
|
|
47
|
-
@return ($px / $base-font-size) * 1em;
|
|
48
|
-
}
|
|
40
|
+
@return math.div($px, $base-font-size) * 1em;
|
|
49
41
|
}
|
|
@@ -24,11 +24,7 @@ $base-font-size: 16px !default;
|
|
|
24
24
|
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@
|
|
28
|
-
@return math.div($px, $base-font-size) * 1rem;
|
|
29
|
-
} @else {
|
|
30
|
-
@return ($px / $base-font-size) * 1rem;
|
|
31
|
-
}
|
|
27
|
+
@return math.div($px, $base-font-size) * 1rem;
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
/// Convert a given px unit to a em unit
|
|
@@ -41,9 +37,5 @@ $base-font-size: 16px !default;
|
|
|
41
37
|
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
42
38
|
}
|
|
43
39
|
|
|
44
|
-
@
|
|
45
|
-
@return math.div($px, $base-font-size) * 1em;
|
|
46
|
-
} @else {
|
|
47
|
-
@return ($px / $base-font-size) * 1em;
|
|
48
|
-
}
|
|
40
|
+
@return math.div($px, $base-font-size) * 1em;
|
|
49
41
|
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright IBM Corp. 2018, 2018
|
|
3
|
-
//
|
|
4
|
-
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
// LICENSE file in the root directory of this source tree.
|
|
6
|
-
//
|
|
7
|
-
//-------------------------------------------
|
|
8
|
-
// Compatibility notes (*.import.scss)
|
|
9
|
-
// ------------------------------------------
|
|
10
|
-
//
|
|
11
|
-
// This file is intended to be consumed and processed with dart-sass.
|
|
12
|
-
// It is incompatible with node-sass/libsass as it contains sass language features
|
|
13
|
-
// or functions that are unavailable in node-sass/libsass, such as `math.div`.
|
|
14
|
-
//
|
|
15
|
-
// The non-`.import` suffixed version of this file eg. `_filename.scss`
|
|
16
|
-
// is intended to be compatible with node-sass/libsass.
|
|
17
|
-
//
|
|
18
|
-
// Styles authored within this file must be duplicated to the corresponding
|
|
19
|
-
// compatibility file to ensure we continue to support node-sass and dart-sass
|
|
20
|
-
// in v10.
|
|
21
|
-
|
|
22
|
-
@use 'sass:meta';
|
|
23
|
-
@use 'sass:math';
|
|
24
|
-
|
|
25
|
-
/// Default font size
|
|
26
|
-
/// @type Number
|
|
27
|
-
/// @access public
|
|
28
|
-
/// @group @carbon/layout
|
|
29
|
-
$carbon--base-font-size: 16px !default;
|
|
30
|
-
|
|
31
|
-
/// Convert a given px unit to a rem unit
|
|
32
|
-
/// @param {Number} $px - Number with px unit
|
|
33
|
-
/// @return {Number} Number with rem unit
|
|
34
|
-
/// @access public
|
|
35
|
-
/// @group @carbon/layout
|
|
36
|
-
@function carbon--rem($px) {
|
|
37
|
-
@if unit($px) != 'px' {
|
|
38
|
-
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@if meta.function-exists('div', 'math') {
|
|
42
|
-
@return math.div($px, $carbon--base-font-size) * 1rem;
|
|
43
|
-
} @else {
|
|
44
|
-
@return ($px / $carbon--base-font-size) * 1rem;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/// Convert a given px unit to a em unit
|
|
49
|
-
/// @param {Number} $px - Number with px unit
|
|
50
|
-
/// @return {Number} Number with em unit
|
|
51
|
-
/// @access public
|
|
52
|
-
/// @group @carbon/layout
|
|
53
|
-
@function carbon--em($px) {
|
|
54
|
-
@if unit($px) != 'px' {
|
|
55
|
-
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@if meta.function-exists('div', 'math') {
|
|
59
|
-
@return math.div($px, $carbon--base-font-size) * 1em;
|
|
60
|
-
} @else {
|
|
61
|
-
@return ($px / $carbon--base-font-size) * 1em;
|
|
62
|
-
}
|
|
63
|
-
}
|