From 846a5f13f9654842067baf121e4aff0f3b700994 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Tue, 2 Aug 2022 18:21:18 -0700 Subject: [PATCH] Simplify title spacing --- assets/css/main.css | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index e630f19..237c51e 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -123,8 +123,6 @@ html { /* Add padding on both sides so that focus outlines don't escape their * containers. This will let us enable CSS containment without * clipping overflowing elements. */ - margin-top: .25em; - margin-bottom: .25em; padding: 0 .5em; } @@ -133,6 +131,23 @@ html { padding-left: .25em } + /* Breadcrumbs get a lot of padding, making the hr margin redundant + * Due to containment, the wide blurb at the top of non-article pages + * has a huge padding on the bottom. This actually works for archive + * pages but not for the main page. */ + article > hr, + body > hr, + main > hr { + margin: 0 .5em; + } + header hr { + margin-bottom: 0; + } + + h1 { + margin: 0 0 .25em; + } + /* Archive pages can get long. Allow them to get long without slowing * down the browser by using content-visibility. */ dt, @@ -404,7 +419,6 @@ blockquote { h1 { -webkit-hyphens: auto; hyphens: auto; - margin-top: .25em; } /* Very narrow screens: full hyphenation.