Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to prototype: CSS color-mix() function.

133 views
Skip to first unread message

Emilio Cobos Álvarez

unread,
Feb 26, 2021, 9:09:28 PM2/26/21
to Mozilla
Summary:

Hi,

In bug 1695376, if all goes well, I plan to land a basic version of the
color-mix() function. This is a trimmed down version of the spec (link
below).

Firefox engineers requested this, and I also think this minimal version
is super-useful on its own, without being blocked on all the HDR color
stuff that we haven't implemented yet.

Bug: https://bugzil.la/1695376

Standard: https://drafts.csswg.org/css-color-5/#color-mix

Note that I'm only implementing the basic color-mix syntax without
per-color-channel adjustments (so just a set of colors and weights), and
I obviously haven't implemented the lab / lch / etc bits because we
don't support those colors yet.

Platform coverage: all

Preference: layout.css.color-mix.enabled

DevTools bug: https://bugzil.la/1695382

Other browsers: Other browsers don't support this yet, to my knowledge.
Safari has started implementing some of the CSS colors for other color
spaces, though not sure if they ship that.

web-platform-tests: I added some basic WPTs that check parsing and that
the interpolation matches the one from CSS animations. More tests are
needed before shipping something like this of course.
0 new messages