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

Dart Sass 2.0.0 support: "Using / for division is deprecated and will be removed in Dart Sass 2.0.0." #436

Open
Jamiewarb opened this issue Sep 27, 2021 · 8 comments

Comments

@Jamiewarb
Copy link
Contributor

Jamiewarb commented Sep 27, 2021

Hey there,

We have been using Inuit for 6 years now, and recently moved over to Dart Sass, away from Node Sass.

Dart Sass is throwing some deprecation warnings for the / division operator:

DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($px, $base-font-size)
More info and automated migrator: https://sass-lang.com/d/slash-div

As LibSass (and therefore NodeSass) is now deprecated (https://sass-lang.com/blog/libsass-is-deprecated), I am wondering what the main contributors thoughts are on if Inuit should be looking to migrate to Dart Sass?

The following is directly from the libsass-is-deprecated article:

How to migrate?

If you’re a user of Node Sass, migrating to Dart Sass is straightforward: just replace node-sass in your package.json file with sass. Both packages expose the same JavaScript API.

...

Please note that because activity on LibSass has been low for several years, it has a number of outstanding bugs and behavioral variations from the Sass spec. You may need to make minor updates to stylesheets to make them compatible with Dart Sass. See this list of major compatibility issues for reference.

@fuhlig
Copy link

fuhlig commented Dec 3, 2021

There is a migration tool that can help with that.

@ktan88
Copy link

ktan88 commented Feb 21, 2022

@fuhlig Nevertheless, wouldn't it be better to use the valid syntax with sass:math?

@fuhlig
Copy link

fuhlig commented Feb 21, 2022

@fuhlig Nevertheless, wouldn't it be better to use the valid syntax with sass:math?

Definitely! My comment was not for Inuit users to migrate their existing codebase to fix warnings in Inuit but for Inuit Devs/Contributors to fix it on the framework level.

@thany
Copy link

thany commented Jun 24, 2022

Current release is 4 years old. There is a nonzero chance of this ever getting fixed, but it's probably still very close to zero 😞

@LayZeeDK
Copy link

You could create a PR or fork it an fix it yourself, @thany 🙂

@thany
Copy link

thany commented Jun 27, 2022

Absolutely true. Guess what I did: thany/inuitcss-dart 😎

@jamieburchell
Copy link

Would @csswizardry consider some PRs to fix the now deprecated Inuit repos where this Dart Sass deprecation comes up? The 2 issues that are raised seem simple to fix. If not, I'll just patch it myself. Problem is I have a huge project using this and there's no good reason to rewrite it.

@arashmilani
Copy link

For future visitors of this thread, If you want to use the inuitcss with dart-sass I published an npm package for that purpose. The node-sass dependency has been replaced by dart-sass. and the SCSS files were updated to change the / to math.div.

📦 https://www.npmjs.com/package/inuitcss-dart

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

No branches or pull requests

7 participants