You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dart Sass will remove use of Slash / for division and instead division will be written using the new math.div() function.
Details
We, Reliability engineering team, are migrating the Bower Origami components used by Heimdall UI with NPM ones. While doing this migration, we have decided to replace node-sass with sass for compiling the .scss files as node-sass is deprecated now.
Due you to the above change, we are getting more than 30 Using / for division is deprecated and will be removed in Dart Sass 2.0.0 deprecation warnings. Some of these warnings are coming from o-colors and some are from o-grid. We have tried to silence these warning but no luck and we are wondering if it is possible to make a new release that fixes these warnings.
Environment
node - v14.16.1
npm - 7.20.3
sass - ^1.36.0
The warnings can be reproduced by cloning this branch and running make build-statics
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($delta, $max)
More info and automated migrator: https://sass-lang.com/d/slash-div
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($red-component * $red-component * $red-magic-number + $green-component * $green-component * $green-magic-number + $blue-component * $blue-component * $blue-magic-number, $brightness-divisor)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
287 │ $number: sqrt((($red-component * $red-component * $red-magic-number) + ($green-component * $green-component * $green-magic-number) + ($blue-component * $blue-component * $blue-magic-number)) / $brightness-divisor);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
node_modules/@financial-times/o-colors/src/scss/_functions.scss 287:16 oColorsColorBrightness()
node_modules/@financial-times/o-colors/src/scss/_functions.scss 237:20 oColorsGetTextColor()
node_modules/@financial-times/o-buttons/src/scss/_functions.scss 155:23 -oButtonsGetPrimaryButtonColors()
node_modules/@financial-times/o-buttons/src/scss/_functions.scss 101:15 -oButtonsGenerateColors()
node_modules/@financial-times/o-buttons/src/scss/_functions.scss 53:19 -oButtonsGetColors()
node_modules/@financial-times/o-buttons/src/scss/_mixins.scss 147:18 -oButtonsAdd()
node_modules/@financial-times/o-buttons/main.scss 107:4 oButtons()
node_modules/@financial-times/o-buttons/main.scss 173:2 @import
node_modules/@financial-times/o-forms/src/scss/main.scss 1:9 @import
node_modules/@financial-times/o-forms/main.scss 9:9 @import
stdin 11:9 root stylesheet
╷
455 │ $saturation: if($max == 0, 0, $delta / $max);
│ ^^^^^^^^^^^^^
╵
node_modules/@financial-times/o-colors/src/scss/_functions.scss 455:32 -oColorsHexToHsbValues()
node_modules/@financial-times/o-colors/src/scss/_functions.scss 141:8 oColorsGetTone()
node_modules/@financial-times/o-colors/src/scss/_mixins.scss 173:11 -oColorsSetPaletteTones()
node_modules/@financial-times/o-colors/main.scss 16:2 @import
node_modules/@financial-times/o-normalise/main.scss 1:9 @import
stdin 6:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($max, 255)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
456 │ $brightness: $max / 255;
│ ^^^^^^^^^^
╵
node_modules/@financial-times/o-colors/src/scss/_functions.scss 456:15 -oColorsHexToHsbValues()
node_modules/@financial-times/o-colors/src/scss/_functions.scss 141:8 oColorsGetTone()
node_modules/@financial-times/o-colors/src/scss/_mixins.scss 173:11 -oColorsSetPaletteTones()
node_modules/@financial-times/o-colors/main.scss 16:2 @import
node_modules/@financial-times/o-normalise/main.scss 1:9 @import
stdin 6:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($brightness, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
417 │ $hsl-luminance: ($brightness/2) * (2 - ($saturation/100));
│ ^^^^^^^^^^^^^
╵
node_modules/@financial-times/o-colors/src/scss/_functions.scss 417:19 -oColorsHsbToHex()
node_modules/@financial-times/o-colors/src/scss/_functions.scss 146:10 oColorsGetTone()
node_modules/@financial-times/o-colors/src/scss/_mixins.scss 173:11 -oColorsSetPaletteTones()
node_modules/@financial-times/o-colors/main.scss 16:2 @import
node_modules/@financial-times/o-normalise/main.scss 1:9 @import
stdin 6:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($saturation, 100)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
417 │ $hsl-luminance: ($brightness/2) * (2 - ($saturation/100));
│ ^^^^^^^^^^^^^^^
╵
node_modules/@financial-times/o-colors/src/scss/_functions.scss 417:42 -oColorsHsbToHex()
node_modules/@financial-times/o-colors/src/scss/_functions.scss 146:10 oColorsGetTone()
node_modules/@financial-times/o-colors/src/scss/_mixins.scss 173:11 -oColorsSetPaletteTones()
node_modules/@financial-times/o-colors/main.scss 16:2 @import
node_modules/@financial-times/o-normalise/main.scss 1:9 @import
stdin 6:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($brightness * $saturation, if($hsl-luminance < 50, $hsl-luminance * 2, 200 - $hsl-luminance * 2))
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
418 │ $hsl-saturation: ($brightness * $saturation) / if($hsl-luminance < 50, $hsl-luminance * 2, 200 - $hsl-luminance * 2);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
node_modules/@financial-times/o-colors/src/scss/_functions.scss 418:19 -oColorsHsbToHex()
node_modules/@financial-times/o-colors/src/scss/_functions.scss 146:10 oColorsGetTone()
node_modules/@financial-times/o-colors/src/scss/_mixins.scss 173:11 -oColorsSetPaletteTones()
node_modules/@financial-times/o-colors/main.scss 16:2 @import
node_modules/@financial-times/o-normalise/main.scss 1:9 @import
stdin 6:9 root stylesheet
WARNING: 33 repetitive deprecation warnings omitted.
The text was updated successfully, but these errors were encountered:
Note: If we move to using the built-in sass modules, then only dart-sass can be used and not lib-sass or ruby-sass as they do not support built-in sass modules
chee
transferred this issue from Financial-Times/o-colors
Sep 16, 2021
@Financial-Times/origami-core I've marked this as breaking because of Jake's comment above. I don't know if we've told people that only dart-sass is supported?
Feature request
What
Dart Sass will remove use of Slash
/
for division and instead division will be written using the newmath.div()
function.Details
We, Reliability engineering team, are migrating the Bower Origami components used by Heimdall UI with NPM ones. While doing this migration, we have decided to replace node-sass with sass for compiling the
.scss
files as node-sass is deprecated now.Due you to the above change, we are getting more than 30
Using / for division is deprecated and will be removed in Dart Sass 2.0.0
deprecation warnings. Some of these warnings are coming fromo-colors
and some are from o-grid. We have tried to silence these warning but no luck and we are wondering if it is possible to make a new release that fixes these warnings.Environment
The warnings can be reproduced by cloning this branch and running
make build-statics
The text was updated successfully, but these errors were encountered: