Re: [csswg-drafts] [css-variables] Substitution of invalid variables into other variables (#5370)

The behavior is now _inconsistent_ with standard properties actually.

> If you want to avoid inheriting the (outer) value into some component, then explicitly set the custom property to initial at the component boundary. This is no different from other properties that inherit by default.

color inherits by default and does _not_ inherit above the component when `initial` is used:
https://jsbin.com/rokoyamixo/1/edit?html,output
<img src="https://user-images.githubusercontent.com/7545075/88760604-01165700-d133-11ea-85f8-61619112496b.png" width="500px">
`initial` makes color behave as if it were unset in the _entire ancestry_, inheriting its `unset` value from the perspective of :root

This is what computed-time-value of `initial` used to do for css variables. (and it's extremely useful)

-- 
GitHub Notification of comment by James0x57
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5370#issuecomment-665442540 using your GitHub account

Received on Wednesday, 29 July 2020 05:37:21 UTC