2 ms·
My favorite viewpoint anecdote: Many sites like to assume (like the article mentions) that a good 'mobile view' cut point is 768px. And some of those sites, in
by pie_flavor 3y ago
My favorite viewpoint anecdote: Many sites like to assume (like the article mentions) that a good 'mobile view' cut point is 768px. And some of those sites, in particular NodeBB (back when I used it), use the particular media queries `max-width: 767px` and `min-width: 768px`. On the right laptop, on the right version of everything, if you drag the title bar to one side of the screen so it resizes to fit half the screen, Chrome will report the width 767.5px and the site will immediately break fantastically.
- deleted 3y ago[deleted]
- aflukasz 3y agoSimilar problem will occur when using min-width and max-width with same value of Xpx - they both match at exactly Xpx. For mutual exclusion `not` should be used. Or https://drafts.csswg.org/mediaqueries/#range-context https://drafts.csswg.org/mediaqueries/#range-context, but that's at only ~83% global adoption rate at the moment, according to https://caniuse.com/css-media-range-syntax https://caniuse.com/css-media-range-syntax.