From ce55c73da4d75a419767e6f02f9636bb599c4c2b Mon Sep 17 00:00:00 2001 From: afterlifepro Date: Wed, 13 Aug 2025 23:21:13 +0100 Subject: [PATCH] Expand markdown styling further im to lazy to be specific --- src/components/markdown.css | 80 +++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 3 deletions(-) diff --git a/src/components/markdown.css b/src/components/markdown.css index 43fe5fa..0c39256 100644 --- a/src/components/markdown.css +++ b/src/components/markdown.css @@ -1,17 +1,22 @@ -/* all styles should be scoped to be child of article to avoid conflicting other styles */ +/* 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; + --content-gap: 20px; - /* all headings should have leading and trailing margins but not between other headings */ + /* all headings should have + leading and trailing margins + but not between other headings */ h1, h2, h3, h4, h5, h6 { - margin-block: 10px; + margin-block: var(--content-gap); & + & { margin-block-start: 0px; @@ -21,4 +26,73 @@ article { margin-block-end: 0px; } } + + > p, + > ul, + > ol, + pre, + blockquote, + table, + hr { + margin-block: var(--content-gap); + } + + :not(pre) > code { + background-color: #00000020; + padding: 2.5px; + border-radius: 5px; + box-decoration-break: clone; + } + + pre { + padding: 10px; + border-radius: 10px; + } + + blockquote { + margin-left: 10px; + padding-left: 10px; + border-image: url(../assets/vr.png) 0 5 fill / 0 0 0 5px round; + } + + hr { + height: 5px; + border: none; + border-image: url(../assets/hr.png) 0 5 fill / 0 5px round; + } + + ul, + ol { + padding-inline-start: 2em; + + & ol { + list-style: lower-alpha; + + & ol { + list-style: lower-roman; + + & ol { + list-style: lower-greek; + + & ol { + list-style: decimal; + + & ol ol { + /* easter egg incase i ever go 7 deep lmao */ + list-style: hebrew; + } + } + } + } + } + + &.contains-task-list { + /* checkbox is marker */ + list-style-type: none; + + input { + margin-inline-end: .5em; + } + } + } } -- 2.51.2