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

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

From: Lea Verou via GitHub <sysbot+gh@w3.org>
Date: Mon, 14 Dec 2020 15:56:04 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-744533906-1607961363-sysbot+gh@w3.org>
@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

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