You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The <declaration-value> production matches any sequence of one or more tokens, so long as the sequence does not contain <bad-string-token>, <bad-url-token>, unmatched <)-token>, <]-token>, or <}-token>, or top-level <semicolon-token> tokens or <delim-token> tokens with a value of "!". It represents the entirety of what a valid declaration can have as its value.
In addition, if the value of a custom property contains a var() reference, the var() reference must be valid according to the specified var() grammar. If not, the custom property is invalid and must be ignored.
But it's indeed not clear if this is intended to mean "direct" var() only, or if the rule also applies to "inner" var()s.
I don't think I had an intention in either direction, but thinking about it now, I do think it's good to validate the nested var()s, and luckily that's the interoperable behavior.
Is it ok that Chrome/FF do not accept
var(--custom, var(--))
at parse time? I would have rather said it is invalid at computed value time.https://w3c.github.io/csswg-drafts/css-variables-2/#using-variables
https://w3c.github.io/csswg-drafts/css-syntax-3/#any-value
I guess they are recursively looking all
var()
in the input list of component values and validate their arguments.The text was updated successfully, but these errors were encountered: