Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don’t you mean rem? If you use em like that you have to make sure that you don’t multiply your font size more than once when nesting elements.


Except that's exactly what you want e.g. when you want something to stand out relative to its context. For instance, you want your headings to be 150% the size of surrounding text, so when you have an info box with smaller text and a heading, that heading should not end up as tall as your main text headings.

Of course you could also have distinct heading classes or equivalent selectors for different contexts, and specify every case in rem, if that's how you like your stylesheets.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: