From a07f58f1a53209b77ee4538abd3bfa9bc4de6f0b Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Mon, 15 Apr 2024 12:55:40 +0800 Subject: [PATCH] Adjust article and content child element spacings --- src/assets/css/main.css | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/assets/css/main.css b/src/assets/css/main.css index 9c4f43b4..3d22d91f 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -143,10 +143,6 @@ h2 { font-size: 1.7rem; } -p { - padding: 0.5rem 0; -} - hr { border: 0.05rem solid var(--clr-title-border); } @@ -177,10 +173,10 @@ a:focus img { } blockquote { - margin: 1.5rem 0; - padding: 0.5rem 1rem; - border-inline-start: 0.1rem solid var(--clr-main-heading); + padding: 0.7em 1.4em; + border-inline-start: 0.1em solid var(--clr-main-heading); background-color: var(--clr-quote-bg); + margin-bottom: 1em; } button:hover { @@ -293,15 +289,23 @@ main { .article__info { text-align: center; display: grid; + gap: 0.2em; } -.article__info p { - padding: 0.1em 0; + +.content h2, .article h2, +.content h3, .article h3 { + margin-bottom: 0.5em; } -.sidebar--sticky { - position: sticky; - top: 5rem; +.content p, +.article p { + line-height: 1.6; +} + +.content p:not(:last-child), +.article p:not(:last-child) { + padding-bottom: 1em; } .left-sidebar, @@ -309,6 +313,11 @@ main { font-size: 0.9rem; } +.sidebar--sticky { + position: sticky; + top: 5rem; +} + /* Desktop main content layout */ @media only screen and (min-width: 60rem) { .content__wrapper {