- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Tue, 15 Aug 2023 18:28:14 +0000
- To: public-css-archive@w3.org
Note that if you want the condition to be true, `width >= 0` is safer than `width < 100vw`.
Also the grammar would be simpler as `<container-condition> = <container-name> || <container-query>`.
Still, the problem with this proposal is that cq units are not tied to the container query, so even if using `@container word-card`, they can resolve against a different container:
```html
<!DOCTYPE html>
<style>
@container foo (width >= 0) {
#target {
width: 100cqw;
height: 100cqw;
background: yellow
}
}
</style>
<div style="width: 200px; border: solid cyan; container: foo / inline-size; --total-aspect-ratio: 1">
<div style="width: 100px; border: solid magenta; container: bar / inline-size">
<div id="target"></div>
</div>
</div>
```

The idea is that `cqw(foo)` would allow

--
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9192#issuecomment-1679352549 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 15 August 2023 18:28:17 UTC