4 ms·
Both em and px units are meant to have an absolute size (in, let's say, millimeters or real pixels of the screen). This makes both units completely different fr
by HelloNurse 6y ago
Both em and px units are meant to have an absolute size (in, let's say, millimeters or real pixels of the screen). This makes both units completely different from percentages and quite similar to each other; the rather arbitrary and unimportant cases in which they are scaled differently don't have a serious impact.
On the other hand, I've wasted more than enough time to debug layouts in which using both units made sizes inconsistent; I tend to use px only for ease of arithmetic.
The important and interesting point in the article is that what should be sized (regardless of the units!) are line height and "cap height" (x-height + ascenders) instead of x-height + ascenders and descenders + arbitrary empty space. It isn't a very convincing argument: depending on the font and text, the apparent height of a line could be represented more faithfully by x-height or by accounting for descenders (and swashes), and specifying different sizes for different fonts isn't particularly difficult.