[csswg-drafts] [css-values-4] Clarify comma-ellision rules (#7182)

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

== [css-values-4] Clarify comma-ellision rules ==

> Commas specified in the grammar are implicitly omissible in some circumstances, when used to separate optional terms in the grammar. Within a top-level list in a property or other CSS value, or a function’s argument list, a comma specified in the grammar must be omitted if:
>
> all items preceding the comma have been omitted
> all items following the comma have been omitted
> multiple commas would be adjacent [...]

I think the [first sentence](https://drafts.csswg.org/css-values-4/#comb-comma) should be *[...] when used to separate an optional term with another term in the grammar* otherwise eg. `, <alpha-value>` can not be omitted in `rgb(<percentage>#{3} , <alpha-value>?)`, because `<percentage>#{3}` is not an optional term.

Similarly, I think comma-ellision rules should not be scoped to a *top-level list* otherwise:

- `attr(data-name "bar")` would not match `attr(<q-name> <attr-type>? , <declaration-value>?)`
- `image(red)` would not match `image(<image-tags>? [<image-src>? , <color>?]!)`

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


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

Received on Wednesday, 30 March 2022 05:43:44 UTC