Intent to ship: color-mix()

224 views
Skip to first unread message

Emilio Cobos Álvarez

unread,
Apr 1, 2023, 9:57:44 PM4/1/23
to dev-pl...@mozilla.org
Hi,

As of real soon, I plan to turn the CSS color-mix() function on by
default on all platforms. It's been on on Nightly for a huge amount of
time, and our front-end uses it quite extensively.

It's been developed behind the layout.css.color-mix.enabled preference.
Chrome ships them as of 111 and Safari also ships these.

It makes sense to let them ride the trains along the rest of the color-4
features that Tiaan has worked on.

Bug to turn on by default:
https://bugzilla.mozilla.org/show_bug.cgi?id=1824526

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

This feature was discussed in this I2P thread:


https://groups.google.com/g/mozilla.dev.platform/c/1MdyhPwaInw/m/2Fi4vWGXAQAJ

Note that since then the spec has matured quite a bit, and we've
implemented the remaining color spaces which was the original reason we
haven't shipped them sooner.

There's quite a battery of tests in WPT and we pass all of them with one
exception about out-of-gamut hsl/hwb colors (mentioned in the patch's
commit message).

Let me know if there's any concern about doing this. Thanks to Tiaan for
working on the other color-4 features that unblock shipping this, this
is already widely used in our front-end.

Cheers,

-- Emilio
Reply all
Reply to author
Forward
0 new messages