w3c / css-houdini-drafts

Mirror of https://hg.css-houdini.org/drafts
https://drafts.css-houdini.org/
Other
1.84k stars 141 forks source link

[css-typed-om-1] `currentColor` is not the only non-absolute color #1125

Open svgeesus opened 6 months ago

svgeesus commented 6 months ago

In 6.7. Serialization from CSSOM Value, several times we read:

If the value is the currentcolor keyword, return "currentcolor". Otherwise, return the result of serializing the <color> value.

That isn't the only case for non-absolute colors. It would be better perhaps to reference CSS Color 5 absolute color whose more comprehensive definition is:

An absolute color is a <color> whose computed value has an absolute, colorimetric interpretation. This means that the value is not:

Nor are any of those values used inside <color-mix()> or in relative color syntax.

svgeesus commented 5 months ago

@tabatkins would you like a PR for this or should I just make the edit directly?

skyfighteer commented 3 weeks ago

I believe this might be the reason why the "light-dark" value is not supported here. (The universal syntax "*" is a good workaround, feel free to try it.)

https://codepen.io/skyfighteer/pen/PorLyOW

svgeesus commented 2 weeks ago

@tabatkins I also see

Otherwise, return the result of serializing the <color> value.

Presumably the serialization of the computed value is meant here (but it would be good to have that confirmed before I make a PR).