Skip to content

Fix media-feature-range-notation false positives for multiple queries and except: exact-value #8826

@Josh-Cena

Description

@Josh-Cena

What minimal example or steps are needed to reproduce the bug?

@media (width: 100px) {
  /* … */
}

@media (width >= 100px) {
  /* … */
}

@media (width: 100px) {
  /* … */
}

What minimal configuration is needed to reproduce the bug?

{
  "rules": {
    "media-feature-range-notation": ["context", { "except": ["exact-value"] }]
  }
}

How did you run Stylelint?

Demo

Which Stylelint-related dependencies are you using?

Latest

What did you expect to happen?

No problems

What actually happened?

Errors:

5:8-24 error Expected "prefix" media feature range notation (media-feature-range-notation)
9:8-22 error Expected "context" media feature range notation (media-feature-range-notation)

Do you have a proposal to fix the bug?

I don't know what exactly is causing this error, but I know that the first condition, @media (width: 100px), which has no errors, must be included. If you remove this condition, then the next two no longer cause errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: wipis being worked on by someone

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions