- From: Bramus via GitHub <noreply@w3.org>
- Date: Tue, 24 Mar 2026 12:35:24 +0000
- To: public-css-archive@w3.org
bramus has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-images-4] Can we allow `image-set()` as an argument to `light-dark()`? ==
One of the responses I got to `light-dark()` now also supporting two `<image>`s as arguments is this:
> Combining and extending image-set with light-dark would be neat!
Basically, the author wants to do the following:
```css
html {
color-scheme: light dark;
background-image: light-dark(
image-set(
"image1-light.jpg" 1x,
"image2-light.jpg" 2x
),
image-set(
"image1-dark.jpg" 1x,
"image2-dark.jpg" 2x
),
);
}
```
The problem here is that `image-set()` is not allowed as an `<image>` argument, as [per spec](https://drafts.csswg.org/css-images-4/#image-set-notation):
> The `image-set()` function can not be nested inside of itself, either directly or indirectly (as an argument to another `<image>` type).
I don’t know the history of this limitation _(and the spec doesn’t seem to mention anything about it)_, but the request from the author seems like a reasonable thing to ask for.
Can we relax things here? Or is this a no-go?
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13709 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 24 March 2026 12:35:25 UTC