[csswg-drafts] [css-color-5] color-contrast needs another comma (#5087)

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

== [css-color-5] color-contrast needs another comma ==
The [color-contrast() function](https://drafts.csswg.org/css-color-5/#colorcontrast) is defined with the grammar:

```
color-contrast() = color-contrast( <color>  <color>#  )
```

This produces the odd (to my eyes) usage like `color-contrast(wheat tan, sienna)`; the lack of a comma between wheat and tan looks very strange!

This sort of "space-separate some initial values from a comma-separated list" grammar *only* shows up in the 'font' shorthand, where it's also weird and confusing; other places where this sort of grammar happens, like gradients, we instead separate the initial stuff from the list-valued stuff with another comma. While this isn't strictly required for parsing, it makes the function read much better.

So the grammar should instead be:

```
color-contrast() = color-contrast( <color> , <color>#  )
```

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

Received on Tuesday, 19 May 2020 19:09:05 UTC