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 compatibility #2198

Merged
merged 1 commit into from
Jun 2, 2022
Merged

Dart-sass compatibility #2198

merged 1 commit into from
Jun 2, 2022

Conversation

brent-yearone
Copy link
Contributor

When updating to dartsass-rails (to replace the deprecated sassc-rails), and get my hands on some SCSS module hawtness, SASS issues deprecation warnings that look like this:

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

Recommendation: math.div($base-spacing, 2) or calc($base-spacing / 2)

The easy fix, while maintaining backwards compatibility, is multiply by 0.5 instead of dividing by two -- that syntax works effectively in dart-sass as well as sassc.

When updating to dartsass-rails (to replace the deprecated sassc-rails), and get my hands on some SCSS module hawtness, SASS issues deprecation warnings that look like this:

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

Recommendation: math.div($base-spacing, 2) or calc($base-spacing / 2)
```

The easy fix, while maintaining backwards compatibility, is multiply by 0.5 instead of dividing by two -- that syntax works effectively in dart-sass as well as sassc
@brent-yearone
Copy link
Contributor Author

brent-yearone commented May 25, 2022

The existing tests cover this change, which is effectively neutral with regards to the compiled CSS output. Also, note that this is orthogonal to #2148 since it's not about what Administrate is using to compile assets, but rather it's about what the host app is using. :)

@pablobm
Copy link
Collaborator

pablobm commented Jun 2, 2022

Indeed, I don't think this needs to wait for the other situation to resolve. Thank you for the simple PR!

@pablobm pablobm merged commit 72ef1b5 into thoughtbot:main Jun 2, 2022
@brent-yearone brent-yearone deleted the patch-1 branch June 3, 2022 18:27
@brent-yearone
Copy link
Contributor Author

You're very welcome! Thank you for all the work you do on administrate! 😀

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

Successfully merging this pull request may close these issues.

2 participants