Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0. #4543

Closed
dangrussell opened this issue Jun 25, 2021 · 19 comments

Comments

@dangrussell
Copy link
Contributor

.scss files use "/" for division. Should be changed to use math.div()

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(ag-param(grid-size), 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

    ╷
246 │         margin: ag-param(grid-size) / 2 0;
    │                 ^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-base\sass\parts\_widgets.scss 246:17         ag-theme-base-part-widgets()    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-base\sass\_ag-theme-base-mixin.scss 39:5     ag-theme-base()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-alpine\sass\_ag-theme-alpine-mixin.scss 8:5  ag-theme-alpine()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-alpine\sass\ag-theme-alpine.scss 7:5         @import

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(ag-param(grid-size), 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

    ╷
255 │         margin-bottom: ag-param(grid-size) / 2;
    │                        ^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-base\sass\parts\_widgets.scss 255:24         ag-theme-base-part-widgets()    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-base\sass\_ag-theme-base-mixin.scss 39:5     ag-theme-base()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-alpine\sass\_ag-theme-alpine-mixin.scss 8:5  ag-theme-alpine()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-alpine\sass\ag-theme-alpine.scss 7:5         @import

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(ag-param(widget-container-vertical-padding), 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

    ╷
493 │         padding: (ag-param(widget-container-vertical-padding) / 2) 0px;
    │                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ╵
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-base\sass\parts\_widgets.scss 493:19         ag-theme-base-part-widgets()    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-base\sass\_ag-theme-base-mixin.scss 39:5     ag-theme-base()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-alpine\sass\_ag-theme-alpine-mixin.scss 8:5  ag-theme-alpine()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-alpine\sass\ag-theme-alpine.scss 7:5         @import

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(ag-param(grid-size), 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
25 │         margin-top: ag-param(grid-size) / 2;
   │                     ^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-base\sass\parts\_filter-tool-panel.scss 25:21  ag-theme-base-part-filter-tool-panel()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-base\sass\_ag-theme-base-mixin.scss 44:5       ag-theme-base()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-alpine\sass\_ag-theme-alpine-mixin.scss 8:5    ag-theme-alpine()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-alpine\sass\ag-theme-alpine.scss 7:5           @import

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(ag-param(grid-size), 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

   ╷
26 │         margin-bottom: ag-param(grid-size) / 2;
   │                        ^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-base\sass\parts\_filter-tool-panel.scss 26:24  ag-theme-base-part-filter-tool-panel()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-base\sass\_ag-theme-base-mixin.scss 44:5       ag-theme-base()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-alpine\sass\_ag-theme-alpine-mixin.scss 8:5    ag-theme-alpine()
    node_modules\@ag-grid-enterprise\all-modules\dist\styles\ag-theme-alpine\sass\ag-theme-alpine.scss 7:5           @import

@sgtsquiggs
Copy link

sgtsquiggs commented Jun 25, 2021

Everywhere that is X / 2 can be replaced with X * 0.5 without having to import sass:math

This can be automated via

$ npm install -g sass-migrator
$ sass-migrator division **/*.scss

@dangrussell
Copy link
Contributor Author

Everywhere that is X / 2 can be replaced with X * 0.5 without having to import sass:math

This can be automated via


$ npm install -g sass-migrator

$ sass-migrator division **/*.scss

I was just regurgitating the recommended solution in the error message -- your way is cleaner & clever-er!

@lk77
Copy link

lk77 commented Jun 29, 2021

yeah i already made an issue :

#4495

but this was abruptly closed by @makinggoodsoftware

they don't really care about issues on this github repo, try their support channel if you are a customer.

@lounsbrough
Copy link

I put a PR up to resolve, I don't know if maintainers will merge, we'll see!

@makinggoodsoftware
Copy link
Contributor

Hi,

Your ticket has been flagged as in_zendesk, it means that we recognize this as an issue worth investigating so we have moved it to our official support channel for customers (zendesk)

We will carry on there with the investigation and we will update you as soon as possible.

Thanks

@makinggoodsoftware
Copy link
Contributor

@lounsbrough Thanks for the PR, I have also processed that, now this has been raised to the dev team, please let us have a look, we will get back to you as soon as possible

Thanks!

@lounsbrough
Copy link

Sounds good, thanks!

@gportela85
Copy link
Member

Thanks for reporting. This issue will be patched in the next release.
Commits:
d5b8f53
91747f4

@fgblomqvist
Copy link

@gportela85 @makinggoodsoftware Are we gonna see a release of this anytime soon?

@SETI-At-Home
Copy link

Any update on this matter?

@dprensha
Copy link

dprensha commented Sep 20, 2021

I think the commit mentioned above (on Jul 2) was released as part of 26.0.0. However, now I'm seeing other deprecation warnings 😬

@HERBOD7
Copy link

HERBOD7 commented Sep 28, 2021

if you used node-sass and sass-loader,
please downgrade the packages to:
node-sass: "^4.14.1", sass-loader: "^10.1.0"

@dangrussell
Copy link
Contributor Author

@best-lucky1030 I would guess that the sass-migrator tool migrates your code, but might not migrate SASS code that you're including from other packages/libraries. For example, it probably isn't going to change any code that's part of ag-grid. Can you identify from the error messages where the problematic code is located?

@sarakahaveci
Copy link

isnt there any solution to this problem?

@ShaneK
Copy link

ShaneK commented Dec 16, 2021

@yamoonz the problem is fixed in current AG-Grid. If you're not subscribed and can't upgrade, you'll need to do a workaround like running the SASS migration script in post install or something.

@vanishree165
Copy link

Everywhere that is X / 2 can be replaced with X * 0.5 without having to import sass:math

This can be automated via

$ npm install -g sass-migrator
$ sass-migrator division **/*.scss

Everywhere that is X / 2 can be replaced with X * 0.5 without having to import sass:math

This can be automated via

$ npm install -g sass-migrator
$ sass-migrator division **/*.scss

This helps me a lot . Thanks @sgtsquiggs 😀

@HCDestroyer
Copy link

Everywhere that is X / 2 can be replaced with X * 0.5 without having to import sass:math

This can be automated via

$ npm install -g sass-migrator
$ sass-migrator division **/*.scss

helped my ass 😜

@chiragDesaiPantherCodx
Copy link

⠼ Generating browser application bundles (phase: building)...WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div(1, $rfs-rem-value)

More info and automated migrator: https://sass-lang.com/d/slash-div


49 │ ($rfs-base-font-size * 0 + 1 / $rfs-rem-value);
│ ^^^^^^^^^^^^^^^^^^

src/assets/scss/bootstrap/vendor/_rfs.scss 49:32 @import
src/assets/scss/bootstrap/_mixins.scss 6:9 @import
src/assets/scss/argon.scss 20:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($rfs-base-font-size, $rfs-base-font-size * 0 + 1 / $rfs-rem-value)

More info and automated migrator: https://sass-lang.com/d/slash-div


48 │ $rfs-base-font-size: $rfs-base-font-size /
│ ┌────────────────────────^
49 │ │ ($rfs-base-font-size * 0 + 1 / $rfs-rem-value);
│ └──────────────────────────────────────────────────^

src/assets/scss/bootstrap/vendor/_rfs.scss 48:24 @import
src/assets/scss/bootstrap/_mixins.scss 6:9 @import
src/assets/scss/argon.scss 20:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($rfs-breakpoint, $rfs-breakpoint * 0 + 1)

More info and automated migrator: https://sass-lang.com/d/slash-div


57 │ $rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/assets/scss/bootstrap/vendor/_rfs.scss 57:20 @import
src/assets/scss/bootstrap/_mixins.scss 6:9 @import
src/assets/scss/argon.scss 20:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($spacer, 2)

More info and automated migrator: https://sass-lang.com/d/slash-div

397 │ $headings-margin-bottom: ($spacer / 2);
│ ^^^^^^^^^^^

src/assets/scss/custom/_variables.scss 397:27 @import
src/assets/scss/argon.scss 24:9 root stylesheet

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($r * 299 + $g * 587 + $b * 114, 1000)

More info and automated migrator: https://sass-lang.com/d/slash-div


62 │ $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/assets/scss/bootstrap/_functions.scss 62:9 color-yiq()
src/assets/scss/custom/_variables.scss 716:31 @import
src/assets/scss/argon.scss 24:9 root stylesheet

DEPRECATION WARNING: $null: Passing a unit other than deg (25%) is deprecated.

To preserve current behavior: $null / 1%

See https://sass-lang.com/d/color-units


19 │ adjust-hue($color, 25%) 100%
│ ^^^^^^^^^^^^^^^^^^^^^^^

src/assets/scss/core/mixins/_background-variant.scss 19:7 bg-gradient-variant()
src/assets/scss/core/utilities/_backgrounds.scss 10:3 @import
src/assets/scss/custom/_utilities.scss 5:9 @import
src/assets/scss/argon.scss 66:9 root stylesheet

WARNING: 68 repetitive deprecation warnings omitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

16 participants