w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.42k stars 652 forks source link

[css-color-5] Clarification on `none` components in relative color syntax. #10360

Open tiaanl opened 3 months ago

tiaanl commented 3 months ago

I have the following examples from wpt:

rgb(from rebeccapurple none none none)
rgb(from rebeccapurple none none none / none)
rgb(from rebeccapurple r g none)
rgb(from rebeccapurple r g none / alpha)
rgb(from rgb(20% 40% 60% / 80%) r g none / alpha)

all using none somewhere in the components. My expectation from the spec is that each component should stay none in the resulting code: rgb(from rebeccapurple none none none) becomes rgb(none none none).

But the current wpt contradicts this assumption. https://github.com/web-platform-tests/wpt/blob/1f9e1af4e5bbd84e79d8c8cd17a135bcf20f6e2d/css/css-color/parsing/color-computed-relative-color.html#L115

svgeesus commented 1 month ago

OK it looks like these tests need review as they encapsulate incorrect assumptions.