w3c / csswg-drafts

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

[css-color] Should specify that `opacity` is serialized as a number for the specified values #10426

Open weinig opened 3 weeks ago

weinig commented 3 weeks ago

The opacity property has a quirk implemented in at least Safari, Firefox and Chrome and tested in css/css-color/parsing/opacity-valid.html, that when the specified value is a percentage, it should be serialized as a normalized number.

This should be formalized in the opacity section of CSS Color.

cdoublev commented 3 weeks ago

It seems that resolving <percentage> to <number> almost always applies at parse time. See https://github.com/w3c/csswg-drafts/issues/9395.