DEV Community

Discussion on: What to do about sub-pixel media-queries?

Collapse
 
alohci profile image
Nicholas Stimpson

"... should we restrict ourselves to only either use min-width or max-width queries but never mix them?" Kind of, yes. Start off with a default value not restricted by a media query. That could be for the smallest screen if you're designing mobile-first, or the largest for super-size-screen-first or something in the mid-range of screens if you prefer. Then use max-width to override the default for smaller screens than your default target, and min-width to override the default for larger screens. Similarly for progressively smaller and larger screens. That way, your styling will never fall in a gap between the media queries.