From 7128e30188f48bd861cb1172e82d608ec5e45f2b Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sun, 10 May 2020 14:25:58 +0200 Subject: [PATCH] list tweaks --- src/components/atoms/Container.module.scss | 2 +- src/components/templates/Post/Toc.module.scss | 5 +++++ src/components/templates/Post/index.tsx | 2 +- src/styles/global.scss | 15 ++++++++++----- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/components/atoms/Container.module.scss b/src/components/atoms/Container.module.scss index 9f0e536d..e27eb2ee 100644 --- a/src/components/atoms/Container.module.scss +++ b/src/components/atoms/Container.module.scss @@ -1,5 +1,5 @@ .container { - max-width: 35rem; + max-width: 37rem; margin-left: auto; margin-right: auto; } diff --git a/src/components/templates/Post/Toc.module.scss b/src/components/templates/Post/Toc.module.scss index 7fc108c8..fd148689 100644 --- a/src/components/templates/Post/Toc.module.scss +++ b/src/components/templates/Post/Toc.module.scss @@ -14,4 +14,9 @@ ul { margin: 0; } + + li { + margin-top: $spacer / 6; + margin-bottom: $spacer / 6; + } } diff --git a/src/components/templates/Post/index.tsx b/src/components/templates/Post/index.tsx index 0ceac68d..bda11ec7 100644 --- a/src/components/templates/Post/index.tsx +++ b/src/components/templates/Post/index.tsx @@ -117,7 +117,7 @@ export const pageQuery = graphql` githubLink } rawMarkdownBody - tableOfContents(maxDepth: 2) + tableOfContents(maxDepth: 3) } } ` diff --git a/src/styles/global.scss b/src/styles/global.scss index 8fb31d31..5078c000 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -49,10 +49,6 @@ ol { margin: 0 0 $spacer; } -p:last-child { - margin-bottom: 0; -} - // Reset fonts for relevant elements ///////////////////////////////////// @@ -255,7 +251,7 @@ ol { li { position: relative; - margin-bottom: $spacer / 4; + margin-bottom: $spacer / 2; // stylelint-disable no-descending-specificity &::before { @@ -266,11 +262,20 @@ ol { user-select: none; } // stylelint-enable no-descending-specificity + + p { + margin-bottom: 0; + } } ul, ol { + margin-top: $spacer / 4; margin-bottom: 0; + + li { + margin: 0; + } } }