TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What's your biggest gripe with CSS Media Queries?

3 pointsby obihillover 8 years ago
I&#x27;m currently finishing up with a complete re-write of a 2-year old JQuery plugin for Responsive Web Design (restive.js). It&#x27;s going to lose the JQuery dependency and have a couple more nice features for modern Web design.<p>I&#x27;ve never used CSS Media Queries to build Responsive websites, primarily because I found them quite frustrating when I started learning Responsive Web design.<p>Still, I know a lot of folks use CSS Media Queries and I&#x27;d like to find out what your biggest issue with it is?

3 comments

dexwizover 8 years ago
I don&#x27;t have a complaint, but I do have a piece of advice. Mobile-first design is real. Developers work largely on desktops, so they make the desktop version first. Then try to use media queries to apply mobile css using max-width. This seems sensible, but just does not seem to work out well. Instead do the unintuitive thing, design it for mobile first, and then scale up to tablet&#x2F;desktop using min-width to apply styles.<p>No matter your choice, go one way. try to avoid mixing min&#x2F;max-width and the cognitive load is way less.
评论 #12355861 未加载
LarryMade2over 8 years ago
Watch for iPhone retina and other hi-res devices that have resolution adjustments beyond the standard screen size.<p>Example query line<p><pre><code> @media only screen and (-webkit-min-device-pixel-ratio: 2) { ...</code></pre>
评论 #12382022 未加载
tmalyover 8 years ago
Not really a complaint, but knowing what the minimal set of screen sizes to use to be the most useful to the most number of devices.
评论 #12367828 未加载