- From: Philipp Wrann via GitHub <sysbot+gh@w3.org>
- Date: Wed, 16 Jun 2021 09:05:11 +0000
- To: public-css-archive@w3.org
I would absolutely love to see native container queries realized. One suggestion though:
Please think about supporting css-vars inside the queries
Example:
```css
@container var(--container-medium, (width > 480px)) {
content: "i am displayed inside medium sized containers";
}
```
This would solve many issues mentioned above and add further flexibility. You could provide a component/framework/whatever with good defaults but also support custom values in a very easy way and the base technology for this (css-vars) is already available!
integration example (lets assume loading a web-component, that uses container queries):
```html
<script type="module" src="//some.cdn/some-component.js"></script>
<style type="text/css">
:root {
--container-medium: (width > 520px);
}
</style>
```
--
GitHub Notification of comment by MajPay
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5796#issuecomment-862188270 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 16 June 2021 09:06:14 UTC