DEV Community

loading...

Discussion on: CSS Units

Collapse
mallockey profile image
Josh Melo

Great article, been trying to wrap my head around this for awhile and this was nice and concise. Question so just to make sure I understand REM is like EM except child containers only base their sizes on the root document? Is that always html?

Collapse
adiatiayu profile image
Ayu Adiati Author

Thank you for reading and for the feedback, Josh.
And I'm happy if it could help you 😊

Yes, with rem (root em), children base their size on the root element.
And the root element is always html.
You can find the explanation here

[...] it is also referred to as the root element

I hope this helps 🙂