[css-contain-4] Define a range syntax for style container queries (original) (raw)
The css-contain-3 spec provides a 'style container feature', allowing authors to query the computed value of a given property on the container. However, that query is currently limited to the declaration syntax, which provides a simple equality comparison:
@container style(--color-mode: dark) { … }
As discussed in #7068, there are also use-cases for range comparisons on container properties:
@container style(padding > 1em) { ... } @container style(--primary-color-lightness > 80) { ... }
For custom properties, this might require a defined syntax using @property? Or would we want a way to define the value type on the query itself? Thoughts?