New Rule: prefer-media-query-range
Open
@DMartens is already working on this.
Since May 4, 2026.
Assessment
This issue has not been assessed yet.
Description
accepted
feature
Rule details
Prefer using media query range syntax over using min/max-*
What type of rule is this?
Suggests an alternate way of doing something
Example code
@media (min-width: 100px) {} /* -> @media (width > 100px) */
@media (min-width: 100px) and (max-width: 200px) {} /* -> @media (100px <= width <= 200px) */
Prior Art
Participation
- I am willing to submit a pull request to implement this rule.
AI acknowledgment
- I did not use AI to generate this issue report.
- (If the above is not checked) I have reviewed the AI-generated content before submitting.
Additional comments
- The syntax is baseline available since 2023.
- The stylelint rule allows to select a preferred style (
prefix(min-width: ...) orcontext(width > ...))
- Dominant language
- JavaScript
- Stars
- 308
- Forks
- 44
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 18
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eslint/css
-
accepted enhancement
-
enhancement
-
feature
-
feature
-
feature
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·