3 ms·
Can someone explain to me why I would want to use either over px? I just don't get it. "One of the best practices to typography on the web is to use relative u
by kristiandupont 11y ago
Can someone explain to me why I would want to use either over px? I just don't get it.
"One of the best practices to typography on the web is to use relative units like rem and em.", it says, but why?? I get as a general philosophy that relative might be preferable over absolute, the way you prefer relative paths in your build system. But "relative" in this case means relative to the font size which is either specified or the default, both which makes s using absolute values just as valid and easier to comprehend..?
- markdown 11y agoA font size that looks great on desktop is not often optimal on mobile devices. You can change your base font size with a media query and have the rest of the website adapt accordingly because they're all sized relative to the base font size.
- vmorgulis 11y ago> Can someone explain to me why I would want to use either over px? Advantage of "em" and "%" (relative) without the cascading (thus absolute).