-
Notifications
You must be signed in to change notification settings - Fork 756
Description
Suppose we have: div { display: var(--undefined,inherit); }
The cascaded value for display is in this example a sequence of tokens (not a CSS-wide keyword), hence the explicit defaulting behavior in the cascade is not triggered. At computed-value time, the var() substitutes to inherit. This is valid per css-values which states that the grammar of all properties are understood to also allow unset | initial | (etc). This means we end up with a valid value of inherit that we somehow have to deal with computed-value time.
It seems useful to be able to use CSS-wide keywords in the fallback, especially with revert. We should consider specifying that if a declaration ends up with a CSS-wide keyword after var() substitution, it's resolved at computed-value time similarly to how it's normally done cascade-time. (I'll just have to think about whether this triggers any of the Bad Stuff from #4155).
Or failing that, make it IACVT, but we shouldn't leave it undefined.