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

[Block-Library] - Sass: DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0 #32533

Closed
shawngrona opened this issue Jun 9, 2021 · 5 comments
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Type] Project Management Meta-issues related to project management of Gutenberg

Comments

@shawngrona
Copy link

shawngrona commented Jun 9, 2021

Description

With Sass v 1.34.0+ we receive the error

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

Recommendation: math.div($content-width, 2)

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

 ╷
 │         max-width: $content-width / 2;
 │                    ^^^^^^^^^^^^^^^^^^
 ╵
    node_modules/@wordpress/block-library/src/pullquote/style.scss 8:14  @import
    node_modules/@wordpress/block-library/src/style.scss 35:9            @import

Step-by-step reproduction instructions

Compile the @wordpress/block-library with sass package 1.34.0+
Bootstrap is experiencing similar issue as are many other projects if you search for the warning text above. Users is github threads report downgrading to sass package 1.32 removes the warning. This is a future breaking change for sass for your package, in meantime its mostly annoying because there is no way to silence a sass warning.

Expected behaviour

No warning

Actual behaviour

Warning

@talldan
Copy link
Contributor

talldan commented Jun 9, 2021

Would have expected the package to have a major version bump, that seems like a big breaking change.

@talldan talldan added [Type] Project Management Meta-issues related to project management of Gutenberg CSS Styling Related to editor and front end styles, CSS-specific issues. labels Jun 9, 2021
@nielslange
Copy link
Contributor

@mkaz As you updated the sass version in #33433, this issue is no longer relevant and can be closed, can't it?

@mkaz
Copy link
Member

mkaz commented Sep 3, 2021

I'm not sure it is an issue. Yes, a warning is giving when using / for division in, but that is to be expected.
Is the error showing in a project outside of Gutenberg code? The instructions to fix are given in the warning either switch to math.div() or use multiplication ie. $content-width / 2 === $content-width * 0.5

This is already updated in the Gutenberg source, here is the relevant pullquote/style.css line

How did you come across the issue? Are you using older packages?
Could you try updating your package libraries and I think it will resolve it?

@nielslange
Copy link
Contributor

@mkaz What I meant is, that I think this issue can be closed as it's no longer relevant. I would close it, if I would have the necessary permissions. As I don't have them, I pinged you.

@mkaz
Copy link
Member

mkaz commented Sep 6, 2021

👍 Great, thanks!

@mkaz mkaz closed this as completed Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Type] Project Management Meta-issues related to project management of Gutenberg
Projects
None yet
Development

No branches or pull requests

4 participants