4 ms·
In print design it’s very common to have a baseline grid, which is partially related to this. It really does wonders to the readability and giving a feeling of
by erwinh 7y ago
In print design it’s very common to have a baseline grid, which is partially related to this. It really does wonders to the readability and giving a feeling of order to the page.
On the web it feels like such a pain to really implement something like that with dynamic page width and content. So in most cases i just nudge things and make sure they are nicely aligned where it makes sense.
- rpastuszak 7y agoYeah, you can calculate the vertical rhythm, but it can be a bit of pain if you can't rely on CSS4 vars or preprocessing (SASS/LESS/PostCSS and such). Still, nowadays this is much easier than even 3-4 years ago. /* _variables.css */ --font-size: 12px; --ru: 1.5; /* _typography.css */ p { font-size: 2rem; line-height: calc(var(--ru) * 2rem); margin: calc(var(--ru) * 1rem) 0; &.small { font-size: 1.5rem; line-height: calc(var(--ru) * 1rem); } }
- erwinh 7y agonice! thanks for sharing :)