csswg-drafts icon indicating copy to clipboard operation
csswg-drafts copied to clipboard

[css-values-5] Trailing comma in `attr()`

Open cdoublev opened this issue 2 years ago • 4 comments

Is a trailing comma allowed in attr() like in var()?

attr() = attr( <q-name> <attr-type>? , <declaration-value>?)

var() = var( <custom-property-name> , <declaration-value>? )

In an exception to the usual comma elision rules, which require commas to be omitted when they’re not separating values, a bare comma, with nothing following it, must be treated as valid in var(), indicating an empty fallback value.

Related: #6345

cdoublev avatar Feb 01 '23 15:02 cdoublev