@carbon/layout 11.18.0 → 11.19.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 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.18.0",
4
+ "version": "11.19.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -36,5 +36,5 @@
36
36
  "core-js": "^3.16.0",
37
37
  "rimraf": "^5.0.0"
38
38
  },
39
- "gitHead": "f9ac32a70a209100bb30ed41edc39c596eae7956"
39
+ "gitHead": "34d9b328b856918ec5a3bfc720f4b3ba3d45daf4"
40
40
  }
@@ -19,6 +19,21 @@ $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
+ @error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
25
+ }
26
+
27
+ @return math.div($px, $base-font-size) * 1rem;
28
+ }
29
+
30
+ /// This function causes an error when using sass > 1.65.0
31
+ /// Replaced with `to-rem` function
32
+ /// @param {Number} $px - Number with px unit
33
+ /// @return {Number} Number with rem unit
34
+ /// @access public
35
+ /// @deprecated
36
+ /// @group @carbon/layout
22
37
  @function rem($px) {
23
38
  @if unit($px) != 'px' {
24
39
  @error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
@@ -19,6 +19,21 @@ $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
+ @error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
25
+ }
26
+
27
+ @return math.div($px, $base-font-size) * 1rem;
28
+ }
29
+
30
+ /// This function causes an error when using sass > 1.65.0
31
+ /// Replaced with `to-rem` function
32
+ /// @param {Number} $px - Number with px unit
33
+ /// @return {Number} Number with rem unit
34
+ /// @access public
35
+ /// @deprecated
36
+ /// @group @carbon/layout
22
37
  @function rem($px) {
23
38
  @if unit($px) != 'px' {
24
39
  @error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";