Skip to content

[mediaqueries] Discrete media feature names in range context #8042

@cdoublev

Description

@cdoublev

It is not clear how grid <= 1 and orientation < portrait should parse/evaluate. Usually, the syntax of a discrete media feature does not accept numeric values but grid accepts 0 or 1 for back-compat and currently orientation < portrait is syntactically valid.

Imo, <mf-range> should be defined with <mf-numeric-value>:

<mf-value> = <mf-numeric-value> | <ident> | <ratio>
<mf-numeric-value> = <number> | <dimension>

This would mean that grid <= 1 is valid and orientation < portrait is a syntax error.

Chrome and FF currently differ on how they parse grid <= 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions