diff --git a/styles/_base.scss b/styles/_base.scss index 7d89d84..2b55d56 100644 --- a/styles/_base.scss +++ b/styles/_base.scss @@ -11,6 +11,10 @@ h2 { font-size: 2.2rem; line-height: 4rem; + &:first-child { + margin-top: 0; + } + &:after { content: ''; display: block; @@ -25,6 +29,10 @@ h3 { margin: layout.$normal-gap 0; font-size: 1.6rem; line-height: 2rem; + + &:first-child { + margin-top: 0; + } } section > h2:first-child { @@ -33,6 +41,14 @@ section > h2:first-child { p { margin: layout.$normal-gap 0; + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } } a { diff --git a/styles/_components.scss b/styles/_components.scss index ac7ec05..4960a3c 100644 --- a/styles/_components.scss +++ b/styles/_components.scss @@ -126,16 +126,6 @@ flex-wrap: wrap; justify-content: space-between; gap: layout.$normal-gap; - - .content { - > p:first-child { - margin-top: 0; - } - - > p:last-child { - margin-bottom: 0; - } - } } // ------------------------------