- From: andruud via GitHub <noreply@w3.org>
- Date: Thu, 31 Jul 2025 12:10:28 +0000
- To: public-css-archive@w3.org
> Allowing `attr()` and comparisons in `if()`
We already resolved to add this.
You can try a prototype in Chrome Canary if you use the runtime flag `--enable-blink-features=CSSContainerStyleQueriesRange`:
```
<!DOCTYPE html>
<style>
div {
color: if(
style(attr(data-foo type(<number>)) < 4): green;
else: red;
);
}
</style>
<div data-foo=3>
Green
</div>
```
--
GitHub Notification of comment by andruud
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12519#issuecomment-3139712680 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 31 July 2025 12:10:29 UTC