Re: [csswg-drafts] [css-color-4] `rgba()` is legacy so does not support `none`. Right? (#7900)

> For what it is worth, Chrome supports none in all 4 syntaxes.

It does? We currently have [good interop on what is invalid for `rgb()` and `rgba()`](https://wpt.fyi/results/css/css-color/parsing/color-invalid-rgb.html?label=experimental&label=master&aligned) and that test [currently says](https://github.com/web-platform-tests/wpt/blob/110db32916fd001c122f049a40fe2004a2490f33/css/css-color/parsing/color-invalid-rgb.html#L17-L20):

```html
    ["rgb(none, none, none)", "The none keyword is invalid in legacy color syntax"],
    ["rgba(none, none, none, none)", "The none keyword is invalid in legacy color syntax"],
    ["rgb(128, 0, none)", "The none keyword is invalid in legacy color syntax"],
    ["rgb(255, 255, 255, none)", "The none keyword is invalid in legacy color syntax"],
```

Do we really want to make legacy, comma-based rgb and rgba accept 'none'?

I [agree with @tabatkins]() that mixing `<number>` and `<percentage>` across the board would be good:

> That said, I definitely support loosening the restriction; it seems like a legacy constraint from an earlier age of CSS design. 

I'm a lot less convinced that allowing legacy, comma-based syntaxes to accept 'none' (and RCS??) would be a good idea. Although having re-read this and related issues for the _n_ th time, I'm also not sure if that is actually being proposed.

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


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

Received on Tuesday, 7 February 2023 18:53:11 UTC