Sent on Mar 16, 2016

Should you use px, em or rem media queries?

Have you wondered if you should use px, em or rem for media queries? I had the same question too, and I never figured it out, not till now.

When I first created the mappy-breakpoint library over a year ago, I used rem units. Then after a conversation with Sam Richard, I quickly switched to em instead.

In addition to em and rem, a popular unit of choice for media queries is the good old pixel. I wondered if it’s possible to use pixel queries nowadays since px-zooming problem that used to exist was now resolved by all browsers.

This week, I finally decided to get to the bottom of this matter. So, check this post out if you’re wondering what unit you should use for your media queries.

http://zellwk.com/blog/media-query-units

Stay awesome,
Zell

PS: The answer might (or might not) surprise you 😉