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

@mildred: Mixins was one of the use cases I mentioned in the original proposal, however do note that the IACVT behavior does limit its utility for those use cases quite severely. Namely, in your example, `background-color` would be set on *every* element, either to `red`, or to `unset`. It would be essentially equivalent to this:

```css
* {
  background-color: unset;
}

#my-error-message {
  background-color: red;
}
```

whereas your mental model is more this:

```css
* {
  
}

#my-error-message {
  background-color: red;
}
```

Unfortunately, the feedback we got from implementers is that if we make the rule cascade, it is much harder to implement. I'm unclear on whether there are any constraints that would make cascading conditionals implementable (either limitations in what they contain, or in the condition itself). The question is, if they do not cascade (outside the rule they are defined in), do they still solve a large number of use cases?

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


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

Received on Monday, 14 December 2020 15:56:06 UTC