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

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

From: andruud via GitHub <sysbot+gh@w3.org>
Date: Wed, 26 May 2021 20:22:26 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-849091911-1622060544-sysbot+gh@w3.org>
What about having the computed variables of a _container_ being one of the things that can be queried by container queries?

```
#component {
  /* Approximately the current state of bikeshed on how to mark a container,
     if I understand Issue 6174 correctly. */
  query: custom-properties;
}

@container (--pill=on) {
   .box { ... }
}
```

This doesn't really add any significant complexity*, since knowing the computed style (and even layout) of the container before evaluating the container query is already needed for normal (size) queries.

We'd then avoid Emilio's concern with Element.matches.

cc @mirisuzanne 

`*` I think. Famous last words.


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 26 May 2021 20:22:28 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:27:23 UTC