Re: [csswg-drafts] [css-images-4] Add `light-dark-image()`, or generalize `light-dark()` for images too? (#12513)

Yes, absolutely. I also prefer to have a linkable target for each of the two forms.

Currently we have

```css
light-dark() =  light-dark( [<color>, <color>] | [<image>, <image>])
```

This should be

```css
light-dark() =  <light-dark-color> | <light-dark-image>
<light-dark-color> = light-dark(<color>, <color>)
<light-dark-image> = light-dark(<image>, <image>) 
```

and then, in the [definition of the `<color>` type](https://drafts.csswg.org/css-color-5/#color-syntax) in CSS Color 5:

```css
<color> = <color-base> | currentColor | <system-color> | 
      <contrast-color()> | <device-cmyk()>  | <light-dark-color>
```

and in the [definition of the `<image>` type](https://drafts.csswg.org/css-images-4/#image-values) in CSS Images 4:

```css
<image> = <url> | <image()> | <image-set()> | <cross-fade()> | 
          <element()> | <gradient> | <light-dark-image>
```


-- 
GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12513#issuecomment-4085662455 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 18 March 2026 21:23:41 UTC