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

@tabatkins The goal here is to make conditional expressions like those arguments used in `if()` able to be stored in properly typed variables so they can be re-used there or other similar contexts.

For example, another function that accepts virtually any value(s) is `random()`, which could work in tandem with this proposed boolean type to produce a random boolean conditions:
```css
@property --random-condition {
  syntax: "<boolean>";
  inherits: true;
  initial-value: random(per-element, true, false);
}

.whack-a-mole {
  display: if(var(--random-condition): block; else: none);
}
```

-- 
GitHub Notification of comment by brandonmcconnell
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10593#issuecomment-2787870062 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 23:37:16 UTC