In w3c/fxtf-drafts#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.
Sebastian
In w3c/fxtf-drafts#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
0as value this seems unexpected. People expect0and0%to be exchangable.E.g. currently
rgb(100% 0 0 / 50%)is currently invalid and needs to be written asrgb(100% 0% 0% / 50%)for this reason.Therefore, I suggest to allow combining unitless
0values with percentages in all color functions.Or, they could even be allowed generally for all places that take
<percentage>values.Sebastian