Re: [csswg-drafts] [css-color-5][css-values-4] Allow use of 0 with <percentage> color components (#7338)

Yeah, we absolutely cannot allow unitless percentages in general; `width: 0%` has very different behavior from `width: 0px` when the container has indefinite available width.

While the color syntaxes don't have a similar issue (their use of %s are relative to fixed reference values, rather than a contextual one), I don't see a good reason to allow 0, *specifically*, to intermix with percentages. I'd rather just relax the grammar to allow *any* mixture of numbers and %s across the arguments. I'm not sure *why* the spec required them to be all one way or the other, as that restriction doesn't do anything productive.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7338#issuecomment-1159271361 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 17 June 2022 22:14:57 UTC