@AlexBueckig
Posted
You are right, but I'd recommend using rem
over em
for the font-size
. When using em
for font-size
the value always refers to the elements parent font-size
and calculates its size according to it. Using rem
(abbreviation for root-em
) always looks at the root element (html-tag) and calculates its size from there. (Remember: Using em for margin and padding always refer to the actual elements font-size
, not the parents.)
This makes it easier if you want to change the font-size in media queries because you mostly just need to change the html's font-size
and all the other font-sizes scale accordingly. The parts where you actually need to manually adjust the font-sizes will be a lot less using this approach.