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
AI acknowledgment
Additional comments
- The syntax is baseline available since 2023.
- The stylelint rule allows to select a preferred style (
prefix (min-width: ...) or context (width > ...))
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
Prior Art
Participation
AI acknowledgment
Additional comments
prefix(min-width: ...) orcontext(width > ...))