@carbon/layout 10.33.0 → 10.34.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 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.33.0",
4
+ "version": "10.34.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -42,5 +42,5 @@
42
42
  "sassDir": "scss",
43
43
  "needs": "^1.3.0"
44
44
  },
45
- "gitHead": "90b2b8c089af8fc2f9db25255d4b27d5b16ca5fe"
45
+ "gitHead": "b5f01ac2dbf9e5acb901cfc939b4ddd4d951a35e"
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
- @return math.div($px, $carbon--base-font-size) * 1rem;
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
- @return math.div($px, $carbon--base-font-size) * 1em;
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
- @return math.div($width - (2 * $margin), $columns);
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
- @return math.div($px, $base-font-size) * 1rem;
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
- @return math.div($px, $base-font-size) * 1em;
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
  }