- From: CSS Meeting Bot via GitHub <noreply@w3.org>
- Date: Wed, 11 Mar 2026 17:03:39 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed ``[css-images-4] Add `light-dark-image()`, or generalize `light-dark()` for images too?``, and agreed to the following: * `RESOLVED: Overload light-dark() to accept image pairs` <details><summary>The full IRC log of that discussion</summary> <fantasai> TabAtkins: We already have light-dark() for colors, makes it very convenient to write colors inline without indirection<br> <fantasai> TabAtkins: Similar request for other types of values, but the most important one is images. Identical use case to colors.<br> <fantasai> TabAtkins: a lot of agreement in the thread that this is a reasonable request<br> <fantasai> TabAtkins: proposal is that we either augment light-dark() to allow pair of colors OR pair of images, and resolves accordingly<br> <emilio> q+<br> <fantasai> TabAtkins: or we add a new function, light-dark-image(), same as light-dark() but accepts images instead<br> <astearns> q+<br> <fantasai> TabAtkins: Thread leans towards augmenting light-dark()<br> <fantasai> TabAtkins: There's further questions about allowint more values than just colors or images<br> <fantasai> TabAtkins: I prefer to not do that right now<br> <fantasai> TabAtkins: Partly because it has some parsing complications<br> <fantasai> TabAtkins: and also, we do have the ability to do that with if()<br> <fantasai> TabAtkins: and the use cases are rarer<br> <astearns> ack emilio<br> <fantasai> TabAtkins: So proposing to allow light-dark() to accept pair of images<br> <fantasai> emilio: I agree with Tab's proposal<br> <ydaniv> +1 TabAtkins<br> <fantasai> emilio: Third alternative is to make it an arbitrary substitution thing, but it makes problems especially for images<br> <fantasai> emilio: image caches, etc.<br> <fantasai> emilio: So keeping it simple, and if you want something complicated use if()<br> <fantasai> emilio: I haven't heard requests for any requests for anything else from FF frontend folks<br> <fantasai> astearns: So you implemented light-dark(<img>, <img>)?<br> <fantasai> emilio: yeah<br> <smfr> q+<br> <dbaron> Is there any complexity here about url() versus image() ?<br> <fantasai> astearns: I don't have a strong opinion on which way to go syntactically<br> <fantasai> astearns: Thinking about other extensions, overloading seems better than creating a new function per type<br> <fantasai> TabAtkins: If we branch out into more thing, grammar issues become more difficult.<br> <dbaron> (had to go, past 1pm)<br> <fantasai> TabAtkins: colors and images are 100% distinct (and should always be), but not doing that rn<br> <fantasai> TabAtkins: so we can address in the future<br> <astearns> ack smfr<br> <fantasai> smfr: People have been talking about URL arguments. Can you nest these?<br> <fantasai> emilio: Yes<br> <fantasai> emilio: And you can have the color version inside your gradient<br> <fantasai> emilio: could even nest that inside the image light-dark<br> <fantasai> [seems weird but doable]<br> <fantasai> PROPOSED: Overload light-dark() to accept image pairs<br> <fantasai> RESOLVED: Overload light-dark() to accept image pairs<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12513#issuecomment-4040713109 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 11 March 2026 17:03:40 UTC