@carbon/elements 10.45.0 → 10.47.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/elements",
3
3
  "description": "A collection of design elements in code for the IBM Design Language",
4
- "version": "10.45.0",
4
+ "version": "10.47.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -35,21 +35,21 @@
35
35
  "clean": "rimraf es lib umd && node tasks/clean.js"
36
36
  },
37
37
  "dependencies": {
38
- "@carbon/colors": "^10.33.0",
39
- "@carbon/grid": "^10.38.0",
40
- "@carbon/icons": "^10.41.0",
38
+ "@carbon/colors": "^10.34.0",
39
+ "@carbon/grid": "^10.39.0",
40
+ "@carbon/icons": "^10.43.0",
41
41
  "@carbon/import-once": "^10.6.0",
42
- "@carbon/layout": "^10.33.0",
43
- "@carbon/motion": "^10.25.0",
44
- "@carbon/themes": "^10.45.0",
45
- "@carbon/type": "^10.37.0"
42
+ "@carbon/layout": "^10.34.0",
43
+ "@carbon/motion": "^10.26.0",
44
+ "@carbon/themes": "^10.47.0",
45
+ "@carbon/type": "^10.38.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@carbon/cli": "^10.30.0",
48
+ "@carbon/cli": "^10.31.0",
49
49
  "fs-extra": "^8.1.0",
50
50
  "klaw-sync": "^6.0.0",
51
51
  "replace-in-file": "^3.4.2",
52
52
  "rimraf": "^3.0.0"
53
53
  },
54
- "gitHead": "3c9fdbcc12116759c47605ad562aa4d3be78b9d5"
54
+ "gitHead": "1836ce1cac8d9a08314b62058a5ed258798901a8"
55
55
  }
@@ -23,6 +23,7 @@
23
23
  // and often derived from, bootstrap:
24
24
  // https://github.com/twbs/bootstrap/blob/v4-dev/scss/mixins/_grid.scss
25
25
 
26
+ @use 'sass:meta';
26
27
  @use 'sass:math';
27
28
  @import '../vendor/@carbon/layout/breakpoint'; /* stylelint-disable-line no-invalid-position-at-import-rule */
28
29
  @import 'prefix'; /* stylelint-disable-line no-invalid-position-at-import-rule */
@@ -46,21 +47,21 @@
46
47
  // always setting `width: 100%;`. This works because we use `flex` values
47
48
  // later on to override this initial width.
48
49
  width: 100%;
49
- padding-right: math.div($gutter, 2);
50
- padding-left: math.div($gutter, 2);
50
+ padding-right: $gutter * 0.5;
51
+ padding-left: $gutter * 0.5;
51
52
 
52
53
  // For our condensed use-case, our gutters collapse to 2px solid, 1px on each
53
54
  // side.
54
55
  .#{$prefix}--row--condensed &,
55
56
  .#{$prefix}--grid--condensed & {
56
- padding-right: math.div($condensed-gutter, 2);
57
- padding-left: math.div($condensed-gutter, 2);
57
+ padding-right: $condensed-gutter * 0.5;
58
+ padding-left: $condensed-gutter * 0.5;
58
59
  }
59
60
 
60
61
  // For our narrow use-case, our container hangs 16px into the gutter
61
62
  .#{$prefix}--row--narrow &,
62
63
  .#{$prefix}--grid--narrow & {
63
- padding-right: math.div($gutter, 2);
64
+ padding-right: $gutter * 0.5;
64
65
  padding-left: 0;
65
66
  }
66
67
  }
@@ -80,8 +81,13 @@
80
81
  // Add a `max-width` to ensure content within each column does not blow out
81
82
  // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
82
83
  // do not appear to require this.
83
- max-width: percentage(math.div($span, $columns));
84
- flex: 0 0 percentage(math.div($span, $columns));
84
+ @if meta.function-exists('div', 'math') {
85
+ max-width: percentage(math.div($span, $columns));
86
+ flex: 0 0 percentage(math.div($span, $columns));
87
+ } @else {
88
+ max-width: percentage(($span / $columns));
89
+ flex: 0 0 percentage(($span / $columns));
90
+ }
85
91
  }
86
92
  }
87
93
 
@@ -91,7 +97,12 @@
91
97
  /// @access private
92
98
  /// @group @carbon/grid
93
99
  @mixin carbon--make-col-offset($span, $columns) {
94
- $offset: math.div($span, $columns);
100
+ $offset: 0;
101
+ @if meta.function-exists('div', 'math') {
102
+ $offset: math.div($span, $columns);
103
+ } @else {
104
+ $offset: ($span / $columns);
105
+ }
95
106
  @if $offset == 0 {
96
107
  margin-left: 0;
97
108
  } @else {
@@ -173,8 +184,8 @@
173
184
  @mixin carbon--make-row($gutter: $carbon--grid-gutter) {
174
185
  display: flex;
175
186
  flex-wrap: wrap;
176
- margin-right: -1 * math.div($gutter, 2);
177
- margin-left: -1 * math.div($gutter, 2);
187
+ margin-right: -1 * $gutter * 0.5;
188
+ margin-left: -1 * $gutter * 0.5;
178
189
  }
179
190
 
180
191
  // -----------------------------------------------------------------------------
@@ -225,20 +236,20 @@
225
236
  /// @group @carbon/grid
226
237
  @mixin carbon--hang($gutter: $carbon--grid-gutter) {
227
238
  .#{$prefix}--hang--start {
228
- padding-left: math.div($gutter, 2);
239
+ padding-left: $gutter * 0.5;
229
240
  }
230
241
 
231
242
  .#{$prefix}--hang--end {
232
- padding-right: math.div($gutter, 2);
243
+ padding-right: $gutter * 0.5;
233
244
  }
234
245
 
235
246
  // Deprecated ☠️
236
247
  .#{$prefix}--hang--left {
237
- padding-left: math.div($gutter, 2);
248
+ padding-left: $gutter * 0.5;
238
249
  }
239
250
 
240
251
  .#{$prefix}--hang--right {
241
- padding-right: math.div($gutter, 2);
252
+ padding-right: $gutter * 0.5;
242
253
  }
243
254
  }
244
255
 
@@ -299,7 +310,11 @@ $carbon--aspect-ratios: (
299
310
  $height: nth($aspect-ratio, 2);
300
311
 
301
312
  .#{$prefix}--aspect-ratio--#{$width}x#{$height}::before {
302
- padding-top: percentage(math.div($height, $width));
313
+ @if meta.function-exists('div', 'math') {
314
+ padding-top: percentage(math.div($height, $width));
315
+ } @else {
316
+ padding-top: percentage(($height / $width));
317
+ }
303
318
  }
304
319
  }
305
320
 
@@ -336,14 +351,14 @@ $carbon--aspect-ratios: (
336
351
  $prev-margin: map-get($prev-breakpoint, margin);
337
352
  @if $prev-margin != $margin {
338
353
  @include carbon--breakpoint($name) {
339
- padding-right: #{math.div($carbon--grid-gutter, 2) + $margin};
340
- padding-left: #{math.div($carbon--grid-gutter, 2) + $margin};
354
+ padding-right: #{($carbon--grid-gutter * 0.5) + $margin};
355
+ padding-left: #{($carbon--grid-gutter * 0.5) + $margin};
341
356
  }
342
357
  }
343
358
  } @else {
344
359
  @include carbon--breakpoint($name) {
345
- padding-right: #{math.div($carbon--grid-gutter, 2) + $margin};
346
- padding-left: #{math.div($carbon--grid-gutter, 2) + $margin};
360
+ padding-right: #{($carbon--grid-gutter * 0.5) + $margin};
361
+ padding-left: #{($carbon--grid-gutter * 0.5) + $margin};
347
362
  }
348
363
  }
349
364
  }
@@ -400,13 +415,13 @@ $carbon--aspect-ratios: (
400
415
 
401
416
  .#{$prefix}--row-padding [class*='#{$prefix}--col'],
402
417
  .#{$prefix}--col-padding {
403
- padding-top: math.div($grid-gutter, 2);
404
- padding-bottom: math.div($grid-gutter, 2);
418
+ padding-top: $grid-gutter * 0.5;
419
+ padding-bottom: $grid-gutter * 0.5;
405
420
  }
406
421
 
407
422
  .#{$prefix}--grid--condensed [class*='#{$prefix}--col'] {
408
- padding-top: math.div($condensed-gutter, 2);
409
- padding-bottom: math.div($condensed-gutter, 2);
423
+ padding-top: $condensed-gutter * 0.5;
424
+ padding-bottom: $condensed-gutter * 0.5;
410
425
  }
411
426
 
412
427
  @include carbon--make-grid-columns($breakpoints, $grid-gutter);
@@ -23,6 +23,7 @@
23
23
  // and often derived from, bootstrap:
24
24
  // https://github.com/twbs/bootstrap/blob/v4-dev/scss/mixins/_grid.scss
25
25
 
26
+ @use 'sass:meta';
26
27
  @use 'sass:math';
27
28
  @import '../layout/breakpoint'; /* stylelint-disable-line no-invalid-position-at-import-rule */
28
29
  @import 'prefix'; /* stylelint-disable-line no-invalid-position-at-import-rule */
@@ -46,21 +47,21 @@
46
47
  // always setting `width: 100%;`. This works because we use `flex` values
47
48
  // later on to override this initial width.
48
49
  width: 100%;
49
- padding-right: math.div($gutter, 2);
50
- padding-left: math.div($gutter, 2);
50
+ padding-right: $gutter * 0.5;
51
+ padding-left: $gutter * 0.5;
51
52
 
52
53
  // For our condensed use-case, our gutters collapse to 2px solid, 1px on each
53
54
  // side.
54
55
  .#{$prefix}--row--condensed &,
55
56
  .#{$prefix}--grid--condensed & {
56
- padding-right: math.div($condensed-gutter, 2);
57
- padding-left: math.div($condensed-gutter, 2);
57
+ padding-right: $condensed-gutter * 0.5;
58
+ padding-left: $condensed-gutter * 0.5;
58
59
  }
59
60
 
60
61
  // For our narrow use-case, our container hangs 16px into the gutter
61
62
  .#{$prefix}--row--narrow &,
62
63
  .#{$prefix}--grid--narrow & {
63
- padding-right: math.div($gutter, 2);
64
+ padding-right: $gutter * 0.5;
64
65
  padding-left: 0;
65
66
  }
66
67
  }
@@ -80,8 +81,13 @@
80
81
  // Add a `max-width` to ensure content within each column does not blow out
81
82
  // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
82
83
  // do not appear to require this.
83
- max-width: percentage(math.div($span, $columns));
84
- flex: 0 0 percentage(math.div($span, $columns));
84
+ @if meta.function-exists('div', 'math') {
85
+ max-width: percentage(math.div($span, $columns));
86
+ flex: 0 0 percentage(math.div($span, $columns));
87
+ } @else {
88
+ max-width: percentage(($span / $columns));
89
+ flex: 0 0 percentage(($span / $columns));
90
+ }
85
91
  }
86
92
  }
87
93
 
@@ -91,7 +97,12 @@
91
97
  /// @access private
92
98
  /// @group @carbon/grid
93
99
  @mixin carbon--make-col-offset($span, $columns) {
94
- $offset: math.div($span, $columns);
100
+ $offset: 0;
101
+ @if meta.function-exists('div', 'math') {
102
+ $offset: math.div($span, $columns);
103
+ } @else {
104
+ $offset: ($span / $columns);
105
+ }
95
106
  @if $offset == 0 {
96
107
  margin-left: 0;
97
108
  } @else {
@@ -173,8 +184,8 @@
173
184
  @mixin carbon--make-row($gutter: $carbon--grid-gutter) {
174
185
  display: flex;
175
186
  flex-wrap: wrap;
176
- margin-right: -1 * math.div($gutter, 2);
177
- margin-left: -1 * math.div($gutter, 2);
187
+ margin-right: -1 * $gutter * 0.5;
188
+ margin-left: -1 * $gutter * 0.5;
178
189
  }
179
190
 
180
191
  // -----------------------------------------------------------------------------
@@ -225,20 +236,20 @@
225
236
  /// @group @carbon/grid
226
237
  @mixin carbon--hang($gutter: $carbon--grid-gutter) {
227
238
  .#{$prefix}--hang--start {
228
- padding-left: math.div($gutter, 2);
239
+ padding-left: $gutter * 0.5;
229
240
  }
230
241
 
231
242
  .#{$prefix}--hang--end {
232
- padding-right: math.div($gutter, 2);
243
+ padding-right: $gutter * 0.5;
233
244
  }
234
245
 
235
246
  // Deprecated ☠️
236
247
  .#{$prefix}--hang--left {
237
- padding-left: math.div($gutter, 2);
248
+ padding-left: $gutter * 0.5;
238
249
  }
239
250
 
240
251
  .#{$prefix}--hang--right {
241
- padding-right: math.div($gutter, 2);
252
+ padding-right: $gutter * 0.5;
242
253
  }
243
254
  }
244
255
 
@@ -299,7 +310,11 @@ $carbon--aspect-ratios: (
299
310
  $height: nth($aspect-ratio, 2);
300
311
 
301
312
  .#{$prefix}--aspect-ratio--#{$width}x#{$height}::before {
302
- padding-top: percentage(math.div($height, $width));
313
+ @if meta.function-exists('div', 'math') {
314
+ padding-top: percentage(math.div($height, $width));
315
+ } @else {
316
+ padding-top: percentage(($height / $width));
317
+ }
303
318
  }
304
319
  }
305
320
 
@@ -336,14 +351,14 @@ $carbon--aspect-ratios: (
336
351
  $prev-margin: map-get($prev-breakpoint, margin);
337
352
  @if $prev-margin != $margin {
338
353
  @include carbon--breakpoint($name) {
339
- padding-right: #{math.div($carbon--grid-gutter, 2) + $margin};
340
- padding-left: #{math.div($carbon--grid-gutter, 2) + $margin};
354
+ padding-right: #{($carbon--grid-gutter * 0.5) + $margin};
355
+ padding-left: #{($carbon--grid-gutter * 0.5) + $margin};
341
356
  }
342
357
  }
343
358
  } @else {
344
359
  @include carbon--breakpoint($name) {
345
- padding-right: #{math.div($carbon--grid-gutter, 2) + $margin};
346
- padding-left: #{math.div($carbon--grid-gutter, 2) + $margin};
360
+ padding-right: #{($carbon--grid-gutter * 0.5) + $margin};
361
+ padding-left: #{($carbon--grid-gutter * 0.5) + $margin};
347
362
  }
348
363
  }
349
364
  }
@@ -400,13 +415,13 @@ $carbon--aspect-ratios: (
400
415
 
401
416
  .#{$prefix}--row-padding [class*='#{$prefix}--col'],
402
417
  .#{$prefix}--col-padding {
403
- padding-top: math.div($grid-gutter, 2);
404
- padding-bottom: math.div($grid-gutter, 2);
418
+ padding-top: $grid-gutter * 0.5;
419
+ padding-bottom: $grid-gutter * 0.5;
405
420
  }
406
421
 
407
422
  .#{$prefix}--grid--condensed [class*='#{$prefix}--col'] {
408
- padding-top: math.div($condensed-gutter, 2);
409
- padding-bottom: math.div($condensed-gutter, 2);
423
+ padding-top: $condensed-gutter * 0.5;
424
+ padding-bottom: $condensed-gutter * 0.5;
410
425
  }
411
426
 
412
427
  @include carbon--make-grid-columns($breakpoints, $grid-gutter);
@@ -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
  @use 'sass:map';
@@ -405,7 +406,11 @@ $carbon--aspect-ratios: (
405
406
  $height: nth($aspect-ratio, 2);
406
407
 
407
408
  .#{$prefix}--aspect-ratio--#{$width}x#{$height}::before {
408
- padding-top: percentage(math.div($height, $width));
409
+ @if meta.function-exists('div', 'math') {
410
+ padding-top: percentage(math.div($height, $width));
411
+ } @else {
412
+ padding-top: percentage(($height / $width));
413
+ }
409
414
  }
410
415
  }
411
416
  }
@@ -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
  @use 'config' as *;
@@ -63,8 +64,13 @@
63
64
  // Add a `max-width` to ensure content within each column does not blow out
64
65
  // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
65
66
  // do not appear to require this.
66
- max-width: percentage(math.div($span, $columns));
67
- flex: 0 0 percentage(math.div($span, $columns));
67
+ @if meta.function-exists('div', 'math') {
68
+ max-width: percentage(math.div($span, $columns));
69
+ flex: 0 0 percentage(math.div($span, $columns));
70
+ } @else {
71
+ max-width: percentage(($span / $columns));
72
+ flex: 0 0 percentage(($span / $columns));
73
+ }
68
74
  }
69
75
  }
70
76
 
@@ -74,7 +80,12 @@
74
80
  /// @access private
75
81
  /// @group @carbon/grid
76
82
  @mixin -make-col-offset($span, $columns) {
77
- $offset: math.div($span, $columns);
83
+ $offset: 0;
84
+ @if meta.function-exists('div', 'math') {
85
+ $offset: math.div($span, $columns);
86
+ } @else {
87
+ $offset: ($span / $columns);
88
+ }
78
89
  @if $offset == 0 {
79
90
  margin-left: 0;
80
91
  } @else {
@@ -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
  }
@@ -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
  }
@@ -279,8 +279,8 @@ $g90: (
279
279
  border-disabled: #393939,
280
280
  text-primary: #f4f4f4,
281
281
  text-secondary: #c6c6c6,
282
- text-placeholder: #6f6f6f,
283
- text-helper: #8d8d8d,
282
+ text-placeholder: #8d8d8d,
283
+ text-helper: #c6c6c6,
284
284
  text-error: #ffb3b8,
285
285
  text-inverse: #161616,
286
286
  text-on-color: #ffffff,
@@ -385,7 +385,7 @@ $g100: (
385
385
  text-primary: #f4f4f4,
386
386
  text-secondary: #c6c6c6,
387
387
  text-placeholder: #6f6f6f,
388
- text-helper: #8d8d8d,
388
+ text-helper: #a8a8a8,
389
389
  text-error: #ffb3b8,
390
390
  text-inverse: #161616,
391
391
  text-on-color: #ffffff,
@@ -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 '../vendor/@carbon/layout/breakpoint'; /* stylelint-disable-line no-invalid-position-at-import-rule */
24
25
  @import 'font-family'; /* stylelint-disable-line no-invalid-position-at-import-rule */
@@ -582,7 +583,11 @@ $tokens: (
582
583
  /// @access public
583
584
  /// @group @carbon/type
584
585
  @function strip-unit($value) {
585
- @return math.div($value, $value * 0 + 1);
586
+ @if meta.function-exists('div', 'math') {
587
+ @return math.div($value, $value * 0 + 1);
588
+ } @else {
589
+ @return $value / ($value * 0 + 1);
590
+ }
586
591
  }
587
592
 
588
593
  /// This helper includes fluid type styles for the given token value. Fluid type
@@ -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 '../layout/breakpoint'; /* stylelint-disable-line no-invalid-position-at-import-rule */
24
25
  @import 'font-family'; /* stylelint-disable-line no-invalid-position-at-import-rule */
@@ -582,7 +583,11 @@ $tokens: (
582
583
  /// @access public
583
584
  /// @group @carbon/type
584
585
  @function strip-unit($value) {
585
- @return math.div($value, $value * 0 + 1);
586
+ @if meta.function-exists('div', 'math') {
587
+ @return math.div($value, $value * 0 + 1);
588
+ } @else {
589
+ @return $value / ($value * 0 + 1);
590
+ }
586
591
  }
587
592
 
588
593
  /// This helper includes fluid type styles for the given token value. Fluid type
@@ -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
  }