What should I choose: REM or EM?

Maciej Trzciński
May 29, 2019 · 1 min read
Image for post
Image for post
Photo by Siora Photography on Unsplash

This theme returns like a boomerang, that I wanna resolve it forever.

I think you asked yourself min once, what should I use rem or em.

You probably know better px than rem/em. Pixels and rem/em have one big difference PX are don’t inherit.

Time for few words about differences between rem and em.

EM — inherit from the parent element

REM — inherits from root element (default is 16px in many browsers)

Image for post
Image for post
Photo by Brendan Church on Unsplash

What choose?

REM — in small projects, but the best way for rems are using it for padding and borders, not for texts.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store