Intent to prototype and ship: light-dark() color function
44 views
Skip to first unread message
Emilio Cobos Álvarez
unread,
Oct 4, 2023, 1:18:29 PM10/4/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Mozilla
Summary: Allow authors to react to the used color-scheme like system
colors do.
See the discussion in [1] for discussions about use cases and future
extensions.
This is a rather simple feature that proves to be very useful to define
color-scheme-dependent values, and specially useful if those values
might be used in both light and dark contexts in the same page.
We've enabled it in the Firefox front-end for a while and it's getting
some usage[2], allowing clean-ups and fixes like this[3].
Other browsers: We'd be the first ones to ship the first implementing,
but the feeling in the CSSWG was pretty positive every time this has
come up, including both Blink and WebKit folks. In fact, Blink already
has an -internal-light-dark() function with essentially the same
functionality as we resolved on.
web-platform-tests: I'm adding WPTs as part of this work.