Skip to content

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

Open
@cdoublev

Description

@cdoublev

#8088 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:

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 allowed in prose 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions