3 ms·
If you use em for say the bottom margin on a heading, it is going to be relative to the font size of that heading (if specified). Where as a rem would always b
by jaseflow 10y ago
If you use em for say the bottom margin on a heading, it is going to be relative to the font size of that heading (if specified).
Where as a rem would always be relative to the root of the document, which is not always the desired effect when it comes to responsive typography.
- manmal 10y agoI'm sure grandparent knows that. The problem with cascadingly using em is that you cannot easily deduce the derived em-value on the nth level (e.g. header > nav > div > a, each with their own em-based font-size; good luck reasoning about a's em-value).