- From: Lea Verou via GitHub <noreply@w3.org>
- Date: Wed, 25 Mar 2026 16:21:06 +0000
- To: public-css-archive@w3.org
LeaVerou has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-color-5] Support `light-dark(<color>, <image>)` by producing a dimensionless image for `<color>` == One issue that kept coming up ([example](https://github.com/w3c/csswg-drafts/issues/12513#issuecomment-4004214916) by @keithamus) in the long discussion in #12513 is the desire to mix colors and images in `light-dark()` now that it supports both. Unfortunately, as @tabatkins explained, we [can't do this "properly"](https://github.com/w3c/csswg-drafts/issues/12513#issuecomment-4014486764): > Yeah, we can't allow that; it would mean that `background: light-dark(url(my-light-image.png), black) white;` is valid or not based on color-scheme, and so would probably require special-purpose validation logic to reject it as invalid preemptively. But what if we encode the workaround we recommend to authors inside the function? > We have `linear-gradient(black)` to produce a solid-color image, and some day `image(black)` if anyone ever chooses to actually implement the `image()` function. Meaning, what if, *any* `<image>` in either argument makes the function return an `<image>` and a `<color>` argument just produces a dimensionless image with that color? That would probably automatically satisfy 99% of use cases that need mixing of `<color>` and `<image>` and avoids confusing error conditions. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13724 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 25 March 2026 16:21:07 UTC