Skip to content

[css-conditional-?][css-values-5] @supports should not use argument grammar #13004

@andruud

Description

@andruud

(Originally reported by @bramus elsewhere.)

The argument grammar of a function is its "basic shape" that determines whether or not it's considered valid during parsing. For example, color: if(potato(yes):green) is valid parse time, even when potato() is not a supported if-test.

Currently, @supports (color: if(potato(yes):green)) {} just checks whether or not the declaration would parse as normal, incorrectly suggesting that potato() is a supported if-test.

We should probably say that @supports checks the standard grammar instead, though we need to ensure that "var()-in-var()" cases are still reported as true, e.g.: @supports (color: if(var(--my-test):green)) {}.

See also #7280, where we decided that selectors should not be forgiving for @supports.

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