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

SebastianZ has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-4][css-values-4] Allow use of 0 with <percentage> color components ==
In https://github.com/w3c/fxtf-drafts/issues/456 it was noted that the examples in Compositing 2 were wrong. The reason for that was that CSS Color 4 doesn't allow to mix `<number>` and `<percentage>` values for color components.

This is generally ok as mixing those two types of values doesn't make sense here, though in case of `0` as value this seems unexpected. People expect `0` and `0%` to be exchangable.

E.g. currently `rgb(100% 0 0 / 50%)` is currently invalid and needs to be written as `rgb(100% 0% 0% / 50%)` for this reason.

Therefore, I suggest to allow combining unitless `0` values with percentages in all color functions.
Or, they could even be allowed generally for all places that take [`<percentage>` values](https://drafts.csswg.org/css-values-4/#percentage-value).

Sebastian

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7338 using your GitHub account


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

Received on Sunday, 5 June 2022 22:44:50 UTC