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

Use dart-sass instead of node-sass? #1250

Closed
mateusbandeiraa opened this issue Sep 7, 2021 · 3 comments
Closed

Use dart-sass instead of node-sass? #1250

mateusbandeiraa opened this issue Sep 7, 2021 · 3 comments

Comments

@mateusbandeiraa
Copy link
Contributor

The project depends on node-sass, which is deprecated in favor of using dart-sass. I was able to validate that it is possible to compile the project using dart-sass without any source-code change at all, but there were some warnings like:

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

Recommendation: math.div($px, $carbon--base-font-size)

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

   ╷
25 │   @return ($px / $carbon--base-font-size) * 1rem;
   │            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules\carbon-components\scss\globals\scss\vendor\@carbon\layout\scss\_convert.scss 25:12     carbon--rem()
    node_modules\carbon-components\scss\globals\scss\vendor\@carbon\layout\scss\_breakpoint.scss 16:23  @import
    src\styles\_carbon-utils.scss 2:9                                                                   @import
    src\styles\_carbon.scss 5:9                                                                         @import
    stdin 23:9                                                                                          root stylesheet

The fix for these issues is fairly simple.

Would it be a welcome change if I submitted a PR replacing node-sass by dart-sass and replacing division operations by math.div?

@mateusbandeiraa
Copy link
Contributor Author

I actually noticed that the .scss files that need to be updated are under carbon-design-system/carbon. We only need to remove node-sass and add dart-sass to the dev dependencies then.

Actually, this problem was resolved by carbon-design-system/carbon#9508, and we can get this change by updating carbon-components to version 10.43.0 (released some days ago). I'll create a PR addressing this shortly.

@rodet
Copy link
Collaborator

rodet commented Dec 21, 2021

@mateusbandeiraa looks like this can be closed then? Thanks for the PR 🙂

@tonyvg2013
Copy link

<"Version 10.43.0-release.0"/>

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

3 participants