Re: [csswg-drafts] [css-variables?] Higher level custom properties that control multiple declarations (#5624)

We'd relax all restrictions related to the proposed const-variables, since we wouldn't need to introduce them: `:const()` would refer to the existing custom properties. When matching selectors for a given element, the computed values of the parent/ancestor/preceding-sibling is already known*, so it should be fine-ish to depend on those computed values during selector matching of a subsequent element.

Might be too annoying for authors if they have to wrap their component in a "control element" just to set high-level variables though. Perhaps combine with an inline `if()`/`switch()` that can be used on the element itself? (Just thinking out loud).

`*` In Chrome that is. Hopefully also in other browsers.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 25 March 2021 17:57:39 UTC