Skip to content

Should the syntax be changed (again) to match CSS Media Queries Level 4 #8

@ausi

Description

@ausi

The Media Queries Level 4 draft allows a slightly different syntax for media features than cq-prolyfill. Using the same syntax as media queries would be more consistent and thus easier to reason about for CSS authors.

The current syntax would still be valid for simple queries e.g. width > 100px, but more variants would be possible like min-width: 100px, text-align: right or even 100px < width.

Queries with two comparisons would change from width > 100px < 200px to the range syntax of the specification 100px < width < 200px or 200px > width > 100px.

The color filters would be changed to a suffix so color lightness <= 20% gets color-lightness <= 20% or max-color-lightness: 20%.

The biggest difference is that media queries don’t allow the not-equal (!=) comparision, so :container(text-align != right) would become :not(:container(text-align = right)) or :not(:container(text-align: right)).

Are the benefits of this enough to justify another change to the syntax of cq-prolyfill? (+1 or -1 comments are welcome too :)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions