DEV Community

Cassidy Williams
Cassidy Williams

Posted on • Originally published at blog.cassidoo.co

Base CSS for your text-based pages

If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:

html {
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  font-size: 1.3em;
  max-width: 40rem;
  padding: 2rem;
  margin: auto;
  line-height: 1.5rem;
}
Enter fullscreen mode Exit fullscreen mode

I use this for a bunch of projects where I just need some plain ol' styling that is better than the defaults (and that I can easily add to), like AI Ipsum and W-9 Crafter.

You can save cass.run/basecss if you want a quick link to the snippet, and here's a little demo of what it looks like:

Top comments (0)