58 Bytes of CSS to Look Great Nearly Everywhere

rw-book-cover

Metadata

Highlights


html { max-width: 70ch; padding: 3em 1em; margin: auto; line-height: 1.75; font-size: 1.25em; } (View Highlight)review


max-width: 70ch > the “readable range” is usually 60-80 character widths, and CSS lets you express that directly with the ch unit. (View Highlight)review


font-size: 1.5em > I’ve noticed that recent design trends and screen sizes have tended toward bigger font sizes. Or maybe I’m getting old. Prefer em or rem over px if you want to let users scale it. (View Highlight)review