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

update to dart sass #43

Merged
merged 3 commits into from
Aug 10, 2022
Merged

update to dart sass #43

merged 3 commits into from
Aug 10, 2022

Conversation

nelhop
Copy link
Collaborator

@nelhop nelhop commented Aug 9, 2022

With an up do date sass loader this deprecation warning is fired:

Deprecation Warning: Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($layout-spacing--default, pow($layout-spacing--ratio, 5)) or calc($layout-spacing--default / pow($layout-spacing--ratio, 5))

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

   ╷
33 │   xxxxs: $layout-spacing--default / pow($layout-spacing--ratio, 5),
   │          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
    node_modules/und-css/src/settings/_settings.scss 33:10  @import
    node_modules/und-css/src/_styles.scss 9:9               @import
    assets/styles/index.scss 3:9                            root stylesheet

https://sass-lang.com/documentation/breaking-changes/slash-div

@nelhop nelhop changed the title chore: use sass math.div instead of slash for division update to dart sass Aug 9, 2022
@nelhop nelhop added the dependencies Pull requests that update a dependency file label Aug 9, 2022
@nelhop
Copy link
Collaborator Author

nelhop commented Aug 9, 2022

Underlying the initial error, a switch to dart-sass is in order, because dart-sass is deprecated.

The dependency rfs is not updated yet and will need to be updated in future: twbs/rfs#363

Copy link
Collaborator

@lucasdinonolte lucasdinonolte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Just unsure if this can break older projects using und-css. If you need this as a hot fix feel free to merge.

If not I'd suggest to also get rid of rfs (replacing it with something like utopia.fyi) before bumping to 1.0.0

@@ -33,7 +33,7 @@
"cross-env": "^7.0.2",
"css-loader": "^4.2.0",
"gh-pages": "^3.1.0",
"node-sass": "^4.14.1",
"sass": "^1.54.3",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Unsure though if this will break older projects using und-css that are still in node-sass.

I would consider adding sass as a peer dependency as well and doing a major version of und-css (1.0.0) so yarn won't install this version into an older project by accident.

@@ -1,6 +1,6 @@
$generate-doc-comments: true;

@import "./src/styles";
@import "//src/styles";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with SASS' latest changes. Is this the way to do it now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently. This is the solution that worked after a quick research.

@lucasdinonolte
Copy link
Collaborator

Just make sure to also update the Changelog before merging

@nelhop nelhop added this to the 1.0 milestone Aug 10, 2022
@nelhop
Copy link
Collaborator Author

nelhop commented Aug 10, 2022

Doing a mayor version sounds like a good idea.

Copy link
Collaborator

@lucasdinonolte lucasdinonolte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me! 👍🏻

Thanks so much for this. I'll merge and use this as the basis for the other things needed towards a 1.0 release.

@lucasdinonolte lucasdinonolte merged commit 6963508 into master Aug 10, 2022
@lucasdinonolte lucasdinonolte deleted the slash-division branch August 10, 2022 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants