Open Bug 2014183 Opened 9 days ago Updated 9 days ago

Create a representation for `@container style()` range queries in the style system

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

People

(Reporter: jfkthame, Unassigned)

References

(Blocks 3 open bugs)

Details

The current prototype support for @container style() queries supports custom-property queries like style(--foo), but the StyleFeature type does not support range queries like style(--foo >= 10px) or style(1em < --foo < 2em). As a first step towards this, we need to create a suitable type to represent these queries, before they can be parsed and processed.

My current thought is to convert the StyleFeature struct into an enum with variants for "plain" and "range" queries, where a "plain" query just has a custom property name and (optionally) value, while a "range" query has a sequence of values and operators.

Blocks: 2014184
Blocks: 2014187

Would be good to somehow reuse the existing QueryFeatureExpressionKind, which feels pretty similar in that regard: https://searchfox.org/firefox-main/rev/7709f0a26aeb3c39a5fd86e794425530f0d0b528/servo/components/style/queries/feature_expression.rs#159

You need to log in before you can comment on or make changes to this bug.