-
Notifications
You must be signed in to change notification settings - Fork 29
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
[Color 4] Add support for CSS Color Level 4. #259
Conversation
This faces a challenge like Calculation simplification, which we decided to not implement on the host side. Currently what I see from this PR is that we would need to implement the same feature twice, once in dart for dart-sass, and then once in pure js for this project. I think we should consider adding Color.change feature to embedded protocol, that is to let the host send an existing color and arguments to change, and then the embedded compiler returns the color after change. This way we don’t need implement the same logic twice or worry about potential drifts in different implementation. |
@ntkme I'm generally wary about asking embedded hosts to make round trips with the compiler just to do value operations, because it opens up a lot of difficulties both in terms of the API design (especially in languages with a strict distinction between synchrony and asynchrony) and in terms of performance (I'd like to avoid hidden cliffs where an operation that looks like it could be efficient is actually very slow). I think maybe the best solution here would just be to say that we don't mandate embedded hosts support all the color operations that the JS API does. |
* main: Update Dart Sass version and release
@nex3 I think this could use another round of quick review -- thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good at a quick glance. Remember to document all functions and include return types before the final.
@nex3 I think this is ready for another round of review. AFAICT all of the API is implemented. |
@nex3 Thanks for the review -- I think I've addressed everything, and this is ready for another round! |
Can you rebase this onto the |
@nex3 Done, though I had already been basing this on |
* feature.color-4:
Add short description + impact @jgerigmeyer I recall you work on some high impact projects that depend on Color.js, can you add a few examples in the third bullet?
Spec - https://github.com/sass/sass/blob/main/proposal/color-4-new-spaces-js.d.ts.md