From 4d0ec46577d7b36dd773a970a3f7591784a5e0e6 Mon Sep 17 00:00:00 2001 From: "tina-cloud-app[bot]" <58178390+tina-cloud-app[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 08:11:06 +0000 Subject: [PATCH] TinaCMS content update Co-authored-by: @cassidoo <1454517+cassidoo@users.noreply.github.com> --- src/posts/base-css.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/posts/base-css.md diff --git a/src/posts/base-css.md b/src/posts/base-css.md new file mode 100644 index 0000000..5d073a6 --- /dev/null +++ b/src/posts/base-css.md @@ -0,0 +1,35 @@ +--- +layout: ../layouts/BlogPost.astro +title: Base CSS for your text-based pages +slug: base-css +description: >- + Sometimes the defaults your web browser gives you aren't very cute. Here's a + lil snippet I use to fix that. +tags: + - technical +added: 2024-01-19T07:56:14.460Z +--- + +If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good: + +```css +html { + font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; + font-size: 1.3em; + max-width: 40rem; + padding: 2rem; + margin: auto; + line-height: 1.5rem; +} +``` + +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](https://ai-ipsum.app/) and [W-9 Crafter](https://github.com/cassidoo/w9-crafter). + +You can save [cass.run/basecss](https://cass.run/basecss) if you want a quick link to the snippet, and here's a little demo of what it looks like: + +
+ See the Pen + Cassidy's base CSS demo by Cassidy (@cassidoo) + on CodePen. +
+