[csswg-drafts] [css-conditional-5] Clarify validity of `var()` in container queries (#11956)

cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-conditional-5] Clarify validity of `var()` in container queries ==
[#8088](https://github.com/w3c/csswg-drafts/issues/8088#issuecomment-1371603358) resolved on accepting `var()` in container queries, which was specified with ed383b5, which I think was intended to allow `var()` rather than _custom properties_. 

So `var()` would be explicitly allowed in prose for size queries.

Style queries accept valid property declarations so `var()` is implicitly allowed.

This is not defined for scroll state queries.

WPT has tests for all three types of container queries:

  - [size queries](https://github.com/web-platform-tests/wpt/blob/9d108498e2bb8990d0e849348621277bd11e65bd/css/css-conditional/container-queries/size-query-with-var.html#L43)
  - [style queries](https://github.com/web-platform-tests/wpt/blob/9d108498e2bb8990d0e849348621277bd11e65bd/css/css-conditional/container-queries/custom-property-style-queries.html#L140)
  - [scroll state queries](https://github.com/web-platform-tests/wpt/blob/9d108498e2bb8990d0e849348621277bd11e65bd/css/css-conditional/container-queries/scroll-state/scroll-state-query-with-var.html#L39)

Browsers are all green for style queries. It varies for the other types of queries.

Should `<size-feature>` and `<scroll-state-feature>` explicitly allow `<var()>` in their sub-productions? I guess it should only be allowed to substitute the feature value, not the feature name or the comparison operator.

Or should it be implicitly allowed like in property values? For example:

  > The value of a custom property can be substituted into the value of a size feature with the `var()` function.

  > The value of a custom property can be substituted into the value of a scroll-state feature with the `var()` function.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11956 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 18 March 2025 15:02:06 UTC