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

@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