@carbon/layout 10.6.0 → 10.7.1
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 +10 -0
- package/package.json +5 -5
- package/scss/_convert.scss +10 -0
package/docs/sass.md
CHANGED
|
@@ -733,6 +733,11 @@ Convert a given px unit to a rem unit
|
|
|
733
733
|
|
|
734
734
|
```scss
|
|
735
735
|
@function carbon--rem($px) {
|
|
736
|
+
@if unit($px) != 'px' {
|
|
737
|
+
// TODO: update to @error in v11
|
|
738
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
739
|
+
}
|
|
740
|
+
|
|
736
741
|
@return ($px / $carbon--base-font-size) * 1rem;
|
|
737
742
|
}
|
|
738
743
|
```
|
|
@@ -761,6 +766,11 @@ Convert a given px unit to a em unit
|
|
|
761
766
|
|
|
762
767
|
```scss
|
|
763
768
|
@function carbon--em($px) {
|
|
769
|
+
@if unit($px) != 'px' {
|
|
770
|
+
// TODO: update to @error in v11
|
|
771
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
772
|
+
}
|
|
773
|
+
|
|
764
774
|
@return ($px / $carbon--base-font-size) * 1em;
|
|
765
775
|
}
|
|
766
776
|
```
|
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.7.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"clean": "rimraf es lib umd scss/generated"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@carbon/bundler": "10.
|
|
28
|
+
"@carbon/bundler": "^10.5.0",
|
|
29
29
|
"@carbon/cli-reporter": "10.3.0",
|
|
30
|
-
"@carbon/scss-generator": "10.
|
|
31
|
-
"@carbon/test-utils": "10.
|
|
30
|
+
"@carbon/scss-generator": "^10.5.0",
|
|
31
|
+
"@carbon/test-utils": "^10.6.0",
|
|
32
32
|
"core-js": "^3.4.0",
|
|
33
33
|
"rimraf": "^2.6.2"
|
|
34
34
|
},
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"sassDir": "scss",
|
|
39
39
|
"needs": "^1.3.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "39adfad91115810d52e38a0ecbb8638b4ea58ea6"
|
|
42
42
|
}
|
package/scss/_convert.scss
CHANGED
|
@@ -17,6 +17,11 @@ $carbon--base-font-size: 16px !default;
|
|
|
17
17
|
/// @access public
|
|
18
18
|
/// @group @carbon/layout
|
|
19
19
|
@function carbon--rem($px) {
|
|
20
|
+
@if unit($px) != 'px' {
|
|
21
|
+
// TODO: update to @error in v11
|
|
22
|
+
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
@return ($px / $carbon--base-font-size) * 1rem;
|
|
21
26
|
}
|
|
22
27
|
|
|
@@ -26,5 +31,10 @@ $carbon--base-font-size: 16px !default;
|
|
|
26
31
|
/// @access public
|
|
27
32
|
/// @group @carbon/layout
|
|
28
33
|
@function carbon--em($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
|
+
|
|
29
39
|
@return ($px / $carbon--base-font-size) * 1em;
|
|
30
40
|
}
|