Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cdoublev opened this issue Feb 1, 2023 · 1 comment
Closed

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

cdoublev opened this issue Feb 1, 2023 · 1 comment
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-values-5

Comments

@cdoublev
Copy link
Collaborator

cdoublev commented Feb 1, 2023

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

@tabatkins
Copy link
Member

No, that's a special exception specifically for var() so you can substitute with an empty value (since you're allowed to define a custom property to have an empty value). It doesn't apply to anything else; the normal comma-elision rules are in force for attr().

@tabatkins tabatkins added css-values-5 Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. labels Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. css-values-5
Projects
None yet
Development

No branches or pull requests

2 participants