Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[fix] Better media query sorting #1407

@mellyeliu

Description

@mellyeliu

Right now we sort media queries by alphanumeric order, leading to unexpected media query ordering and behaviour for overlapping breakpoints. The config enableMediaQueryOrder exists to tackle this properly but it has some unresolved bugs and does not yet work with defineConsts. We can improve media query ordering by sorting queries in a way that smaller breakpoints (covering less range) win over larger ones.

For example, as a starting point:

  • For max-width, sort from smallest number to largest
  • For min-width, the inverse

Steps:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions