Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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

[2] http://foundation.zurb.com/docs/components/interchange.html#...



This explains the benefits:

http://blog.cloudfour.com/the-ems-have-it-proportional-media...

Here's some boilerplate code:

https://github.com/johannaruiz/propotional-mqs

Make sure you set the viewport correctly:

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...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: