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 and Sass modules #11

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

dawaltconley
Copy link

@dawaltconley dawaltconley commented Mar 15, 2023

Resolves #9, resolves #10, and maybe #3. I couldn't get the old tests working with bootcamp & grunt, so I rewrote them using sass-true and jest. I also added a number of others in order to confirm that the update hasn't changed things. I'm not sure whether all the results are intended---the calculate-alpha function sometimes returns Infinity or NaN---but at least they haven't changed.

The last commit is admittedly an aesthetic change / not needed to resolve deprecation: it drops the ch- prefix from function names since scoping is now handled by the module system, and can be re-added using @forward 'sass-color-helpers' as ch-*;. This is breaking in that anyone using the current version in dart sass will need to re-add those prefixes to keep their functions working as-is. If that's a concern, it could be made non-breaking by having two entrypoints: the old one can @forward all functions with the prefix, and the new one (_index.scss, rationale here) can forward them without the prefix. Not sure whether this is worth the potential for confusion.

Thank you for this package btw, the color contrast functions have proven very useful!

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.

Dart Sass compatibility Make into a proper Sass module
1 participant