css-houdini-drafts icon indicating copy to clipboard operation
css-houdini-drafts copied to clipboard

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

Open svgeesus opened this issue 1 year ago • 3 comments

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 avatar Mar 21 '24 07:03 svgeesus

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

svgeesus avatar Apr 08 '24 19:04 svgeesus

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

skyfighteer avatar Sep 11 '24 16:09 skyfighteer

@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).

svgeesus avatar Sep 16 '24 14:09 svgeesus