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; + } + } +}