Dimensional media/container queries can evaluate in a boolean context. This isn't terribly useful (dimensional queries aren't the main use-case for booleans), but it works:
@container (inline-size) { /* element has an inline-size container with inline-size greater than 0 */ }
With style queries, a boolean check is much more useful:
@container style(gap) { /* remove margins when a gap is defined? */ } @container style(--button-theme) { /* shared styles for all button themes? */ } @container style(--reverse) { /* styles for something that's reversed? */ }
I think all these checks are possible in the current spec by querying for initial
and negating the query, so allowing boolean queries would just be syntax sugar:
@container not style(gap: initial) { /* remove margins when a gap is defined? */ } @container not style(--button-theme: initial) { /* shared styles for all button themes? */ } @container not style(--reverse: initial) { /* styles for something that's reversed? */ }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3