Re: [csswg-drafts] [css-values-5] Boolean values in CSS custom properties (#10593)

This is a model example from that draft `css-values-5` spec (re the [`if()` function](https://drafts.csswg.org/css-values-5/#if-notation)):
```css
.foo {
  --color: if(media(width >= 600px): blue; else: var(--foo));
}
```

It would be helpful to be able to re-use such a boolean condition, like this:
```css
@property --condition {
  syntax: "<boolean>";
  inherits: true;
  initial-value: false;
}

.foo {
  --condition: media(width >= 600px);
  color: if(var(--condition): blue; else: red);
  width: if(var(--condition): 20px; else: 10px);
}
```

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


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

Received on Tuesday, 8 April 2025 18:42:12 UTC