Re: [csswg-drafts] [css-color-4] Concerns about color() function fallback (#5931)

> I don't think this is reasonable.

You are right, considering your use case this is not a proper solution. The explicit fallback in `color()` seems ideal for `forced-colors`.

> What user agent are you talking about?

Carte/Css4j, and [Css4j](https://css4j.github.io/) (which has the described behavior) is being used by other projects to do conversions to PDF. There, if you have the following:
```css
--my-color: invalid;
...
border: 1px var(--my-color, #00f);
color: var(--my-color, #00f);
```
the declaration for `border` would be invalid, but the one for `color` would work as being a single, outermost `var()`. Back when I implemented that, it seemed like a solution closer to author's intent, and assumed that browsers would do the same or that (an older version of) the spec allowed that.

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


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

Received on Wednesday, 3 March 2021 12:49:46 UTC