Re: [csswg-drafts] [css-env][mediaqueries] Support comparing value of environment variable (#3578)

You can achieve this with style queries:

```css
:root {
 --size: env(safe-area-inset-bottom, -1px);
}

@container style(--size: 0px) {
 body {
  background: blue;
 }
}
```

Or using the upcoming `if()`:

```css
body {
 background: if(
  style(--size: 0px): green;
  else: initial;
 );
}
```

The one thing that is missing though, is range comparisons in style queries, for which I have filed https://github.com/w3c/csswg-drafts/issues/11759

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 21 February 2025 12:24:55 UTC