Open emilio opened 1 month ago
It seems that it should be the value including currentcolor
, so that it works correctly when inherited into child elements.
I agree the computed value should include currentColor, the question is whether getComputedStyle should resolve it (like it does for any non-custom color property)
The CSS Working Group just discussed [css-properties-and-values-api] Resolved value of registered <color> custom properties.
, and agreed to the following:
RESOLVED: <color> values returned by getComputedStyle() on standard CSS properties or registered custom properties is the used value
RESOLVED: computed <color> values returned by TypedOM are the actual computed value
The WPTs for this disagree on what the resolved value (getComputedStyle) of custom properties is when the computed value is currentcolor / color-mix() of currentcolor:
registered-property-computation.html says that it should return the value including
currentcolor
:https://github.com/web-platform-tests/wpt/blob/efe3de7191/css/css-properties-values-api/registered-property-computation.html#L161
at-property-animation says that it should be resolved:
https://github.com/web-platform-tests/wpt/blob/efe3de7191/css/css-properties-values-api/at-property-animation.html#L440-L452
The computed value above is
color-mix(in srgb, currentcolor, rgb(200, 200, 200))
. Which one is it? Am I missing something? What is Blink / WebKit doing?cc @flackr