3 ms·
Can you explain the benefit of defining media queries with em's rather than pixels? It seems like an unnecessary layer of mental translation for developers, giv
by kderbe 13y ago
Can you explain the benefit of defining media queries with em's rather than pixels? It seems like an unnecessary layer of mental translation for developers, given that you deem it necessary to list px-equivalents in the CSS comments. [1]
Also, the medium/large screen sizes in Interchange don't align with the media query sizes. Interchange says 1024px wide is large, [2] but the media query says 1024px wide is medium. Or is it just a documentation error?
[1] http://foundation.zurb.com/docs/media-queries.html http://foundation.zurb.com/docs/media-queries.html
[2] http://foundation.zurb.com/docs/components/interchange.html#named-queries http://foundation.zurb.com/docs/components/interchange.html#...
- Flenser 13y agoThis explains the benefits: http://blog.cloudfour.com/the-ems-have-it-proportional-media-queries-ftw/ http://blog.cloudfour.com/the-ems-have-it-proportional-media... Here's some boilerplate code: https://github.com/johannaruiz/propotional-mqs https://github.com/johannaruiz/propotional-mqs Make sure you set the viewport correctly: http://blog.javierusobiaga.com/stop-using-the-viewport-tag-until-you-know-ho http://blog.javierusobiaga.com/stop-using-the-viewport-tag-u... as an incorrect viewport can cause issues with some mobile browsers: http://www.quirksmode.org/blog/archives/2013/11/a_day_in_the_li.html http://www.quirksmode.org/blog/archives/2013/11/a_day_in_the...