Re: [csswg-drafts] [css-color-5] Clarification of rgb() syntax (#8231)

Thanks again for the updates: definitions are correctly extracted from CSS Color 4 and 5.

I am not sure I was right about this in my previous comment:

  > Legacy color syntaxes should not allow to mix them, but I think this is a different problem (may be related: #8311) that could be fixed by replacing `<alpha-value>` by `<number>` OR `<percentage>` in the appropriate locations of `<legacy-rgb-syntax>` and `<legacy-rgba-syntax>`

In my mind, `<number>` and `<percentage>` cannot be mixed in all components, without distinction between color channels and alpha channel. The current definition of the legacy syntax says *components must be specified using either all-`<percentage>` or all-`<number>`, they can not be mixed* but further above, it says _**color** components are separated by commas_ (emphasize added on *color*).


But `rgb(0, 0, 0, 50%)` is valid in Chrome/FF. It seems there is no WPT testing mixing color components as `<number>` and alpha-value as `<percentage>` (or vice-versa).

Do you think *color* should be added before *components* in the sentence *components must be specified using either all-`<percentage>` or all-`<number>`, they can not be mixed*?

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


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

Received on Monday, 6 March 2023 05:35:27 UTC