top | item 33608175

(no title)

chriswep | 3 years ago

> Long gone are the days of 62.5% font size trick.

Isn't the 62.5% trick about making the code easier to write/understand/maintain? Or are you advocating for not using relative units at all? That might work for some use cases however it breaks if you need any kind of scaling feature within the site/app.

discuss

order

piskerpan|3 years ago

62.5% was specifically to bring the default 16px to 10px, which meant now 1em = 10px, at least at the root. With that, you could easily size your entire layout in EMs and, yes, keep it readable:

    .main {
        width: 80em
    }
    .sidebar {
        width: 20em;
    }
    .content {
        width: 60em;
    }
There's no point in bringing the font down to 10px if you're not going to use EMs

chriswep|3 years ago

As far as i understand it's about `rem`, not `em` (which is relative to it's parent not the 62.5-normalized root element). And as long as you don't go all-in with absolute units (and loose all control over custom scaling on your site/app), you still need `rem`.