From 5ef1a3c9f247387fb9b448fa82ad90170a351629 Mon Sep 17 00:00:00 2001 From: afterlifepro Date: Wed, 13 Aug 2025 22:01:13 +0100 Subject: [PATCH] Add start of markdown reset --- src/components/markdown.css | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/components/markdown.css diff --git a/src/components/markdown.css b/src/components/markdown.css new file mode 100644 index 0000000..43fe5fa --- /dev/null +++ b/src/components/markdown.css @@ -0,0 +1,24 @@ +/* all styles should be scoped to be child of article to avoid conflicting other styles */ +article { + /* comfy reading width centered */ + max-width: 60ch; + margin: auto; + + /* all headings should have leading and trailing margins but not between other headings */ + h1, + h2, + h3, + h4, + h5, + h6 { + margin-block: 10px; + + & + & { + margin-block-start: 0px; + } + + &:has(+ &) { + margin-block-end: 0px; + } + } +} -- 2.51.2