W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2021

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

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Tue, 05 Jan 2021 19:03:44 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-754835779-1609873423-sysbot+gh@w3.org>
@bramus There are several issues with this proposal.

* My understanding is that anything selector-based cannot depend on computed styles, as cascading needs to be processed earlier. 
* Even if we *could* do this with selectors, it would have been a pseudo-class, not entirely new syntax that looks like attribute selectors but isn't. 
* Even if we *could* do this with selectors, this one limits it to `var()` references. That's not a problem in itself, but if we are going to limit it that much, we may as well ditch the `@var()` and just specify the `<dashed-ident>` to compare against. The whole point of using `var()` was that we could compare with other types of values as well (or calculations, or...)
* The issue of partial application is very specific to the way of desugaring `@if` that I proposed to make it easier to implement. Conceptually (if implementation was not an issue), it's trivial to resolve, the difficulty is in resolving it in a way that's also implementable. Same with nesting: we could easily resolve partial application by specifying that conditions match where they are specified, and only the result propagates to nested rules, the difficulty is in how to make that implementable.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 5 January 2021 19:03:51 UTC

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