From 2008c155f70d06d6a2bfd4f45786897a8f040abc Mon Sep 17 00:00:00 2001 From: Jean-Philippe Sirois Date: Thu, 21 May 2020 13:09:11 -0400 Subject: [PATCH] ui: add spacer bar between h2 --- src/components/Markdown/styles.tsx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/components/Markdown/styles.tsx b/src/components/Markdown/styles.tsx index 79b6e0f..ad6b9f2 100644 --- a/src/components/Markdown/styles.tsx +++ b/src/components/Markdown/styles.tsx @@ -69,6 +69,32 @@ export const MarkdownWrapper = styled.div` line-height: ${BASE_LINE_HEIGHT}px; } + h2 + h3 { + margin-top: 0; + } + + h3 + h4 { + margin-top: 0; + } + + h4 + h5 { + margin-top: 0; + } + + h5 + h6 { + margin-top: 0; + } + + h2 ~ h2::before { + display: block; + margin-bottom: ${BASE_LINE_HEIGHT * 2}px; + content: ""; + height: 1px; + margin-right: -27px; + background: ${(props) => + props.theme.name === "dark" ? "#34414e" : "#a3beda"}; + } + h1 .anchor svg, h2 .anchor svg, h3 .anchor svg,