From da27e3b4543096f0a3f344c69f5a6d2e5ddb6c68 Mon Sep 17 00:00:00 2001 From: zhengqi zhang <770166635@qq.com> Date: Fri, 11 Aug 2023 12:04:50 +0800 Subject: [PATCH] increase margin for headings --- src/components/PageContent/PageContent.astro | 7 ++++--- src/styles/index.css | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/PageContent/PageContent.astro b/src/components/PageContent/PageContent.astro index 056d83e3c..f215946b7 100644 --- a/src/components/PageContent/PageContent.astro +++ b/src/components/PageContent/PageContent.astro @@ -47,8 +47,6 @@ const whatsNext = content.whatsnext .content :global(h2) { font-weight: 500; - margin-top: 30px; - margin-bottom: 20px; } @media (min-width: 50em) { @@ -57,7 +55,10 @@ const whatsNext = content.whatsnext } .content :global(h2) { font-weight: 600; - margin-top: 100px; + padding-top: 16px; + } + .content :global(h2:first-of-type) { + padding-top: 0; } .content :global(a) { font-weight: 600; diff --git a/src/styles/index.css b/src/styles/index.css index 09aebeb47..c3016d3fc 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -43,6 +43,7 @@ nav ul { .content :is(ul, ol) { line-height: 1.25em; margin-bottom: 0.7em; + margin-bottom: 16px; } .content :is(ul, ol) > li > :is(ul, ol) { @@ -126,8 +127,8 @@ article > section iframe { .main-section :is(h2, h3, h4) { /* Override styles from design-system */ - margin-top: 40px; - margin-bottom: 40px; + margin-top: 36px; + margin-bottom: 24px; max-width: 100%; }