[csswg-drafts] [color-4] Clarification of missing color components and parsing (#8362)

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

== [color-4] Clarification of missing color components and parsing ==
In reference to this section in the [color-4] specification:
https://github.com/w3c/csswg-drafts/blob/69398afe4c10c7bfa9164c10d4a2b8b3ae2b50ef/css-color-4/Overview.bs#L983

According to what is mentioned here, I am uncertain whether missing color components should parse to a valid or invalid color. Currently the following are all valid colors:

```
color(srgb)  // 0, 0, 0
color(srgb 1)  // 1, 0, 0
color(srgb 1 1)  // 1, 1, 0
color(srgb 1 1 1)  // 1, 1, 1
```

There is also a definition of the color syntax here (https://w3c.github.io/csswg-drafts/css-color-4/#color-function):

```
<predefined-rgb-params> = <predefined-rgb> [ <number> | <percentage> | none ]{3}
```

which does not allow any missing components, but does indeed accept the 'none' keyword.

Does this rule make the previously mentioned valid color invalid if they do not have the 'none' keyword in place of the missing components?

```
color(srgb none none none)  // 0, 0, 0
color(srgb 1 none none)  // 1, 0, 0
color(srgb 1 1 none)  // 1, 1, 0
color(srgb 1 1 1)  // 1, 1, 1
```


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


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

Received on Thursday, 26 January 2023 11:23:46 UTC