csswg-drafts
csswg-drafts copied to clipboard
[css-values-5] Trailing comma in `attr()`
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