Update to Dart Sass and Sass modules #11
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 returnsInfinity
orNaN
---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!