- From: Brandon McConnell via GitHub <sysbot+gh@w3.org>
- Date: Tue, 08 Apr 2025 23:37:15 +0000
- To: public-css-archive@w3.org
@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