dart-sass icon indicating copy to clipboard operation
dart-sass copied to clipboard

Implement color spaces

Open nex3 opened this issue 3 years ago • 3 comments

  • [x] Implementation (Language)
  • [x] Implementation (JS API)
  • [ ] Breaking changes

See https://github.com/sass/sass/issues/2831

nex3 avatar Sep 21 '22 01:09 nex3

@nex3 what is the state of this implementation ? Color Level 4 is now coming to all browsers (shipped in Safari and Chrome; available behind a flag in Firefox which is enabled by default in Firefox Nightly so likely to ship in a few weeks) so it would be great to have access to them in Sass.

stof avatar Apr 08 '23 10:04 stof

@mirisuzanne and I are still hammering out the details. A draft implementation is available on the features.color-4 branch, but the spec keeps changing out from under us so it's been difficult to nail down 100% final behavior. (It's paradoxically easier for browsers to change their edge case behavior than for us, since browsers have the ability to see whether something is used in the wild.)

The other big blocker here is getting tests written/updated for every corner of the (very large) proposal. Although the implementation is likely mostly correct, I'm sure I got some corners wrong in ways we won't know until we test it.

nex3 avatar Apr 08 '23 21:04 nex3