I am Eric A. Meyer. Ask me anything.

View other answers to this thread
Mat Marquis's photo

ay yo eric

Why rem over em for media queries?

Eric A. Meyer's photo

I usually use em, but most of the queries I inherit from others use rem. And I can see an argument for rems when trying to create a consistent visual rhythm, where you want a thing to have a width regardless of whether it’s an h1 or an ordered list. Of course, Grid layout might take us in a very different direction!