W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2020

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

From: James Atherton via GitHub <sysbot+gh@w3.org>
Date: Wed, 29 Jul 2020 05:37:19 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-665442540-1596001038-sysbot+gh@w3.org>
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:
<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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:12 UTC