-
Notifications
You must be signed in to change notification settings - Fork 756
Description
Comma-ellision rules 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) 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 note: imo, I think it should be [...] to separate an optional term.
In the above definition, the second comma can be omitted only if [ <linear-color-hint>? , <linear-color-stop> ] defines 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.