[csswg-drafts] [css-values] Define a top-level list (#6557)

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

== [css-values] Define a top-level list ==
[Comma-ellision rules](https://drafts.csswg.org/css-values-4/#comb-comma) are defined in CSS Values as applicable *within a **top-level list** in a property or other CSS value, or a function’s argument list*. 

What defines a **top-level list**? Does the following definition value (from [CSS Images 3](https://drafts.csswg.org/css-images-3/#radial-gradient-syntax)) contain a "sub-level" list? Are `[]` (grouping) the only way to define a sub-level list?

```
<linear-color-stop> , [ <linear-color-hint>? , <linear-color-stop> ]#
```

The spec defines that a comma is *implicitly omissible in some circumstances, when used to separate optional terms*.

**Side notes:** imo, I think it should be *[...] to separate an optional term*, and I raised another [issue](https://github.com/w3c/csswg-drafts/issues/6425) related to the above definition value, among other things, because it prevents a gradient defined with a single color stop due to the first comma that can not be omitted, because the group is not optional.

In the above definition, this second comma can be omitted only if `[ <linear-color-hint>? , <linear-color-stop> ]` defines (or is part of) a top-level list and *all items preceding the comma have been omitted*. If it does not define a top-level list and it is a sub-level list, then the second comma can not be omitted.

Defining a **top-level list** would make things more clear, at least for me, I think. I can't find any other "top-level list" occurrences in CSS Values.

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


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

Received on Monday, 30 August 2021 14:04:40 UTC