From 35c76c077e6b5dd0474ee345759c3f3df70b2dd2 Mon Sep 17 00:00:00 2001 From: keyan Date: Sun, 28 Jan 2024 13:25:55 -0600 Subject: [PATCH] improved footnote styling and list styling --- components/text.module.css | 59 +++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/components/text.module.css b/components/text.module.css index 9166df53..20ced3ad 100644 --- a/components/text.module.css +++ b/components/text.module.css @@ -8,6 +8,34 @@ max-height: 200vh; } + +.text :global(.footnotes) { + font-size: smaller; + color: #8b949e; + border-top: 1px solid #30363d; +} + + /* Hide the section label for visual users. */ +.text :global(.sr-only) { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + overflow: hidden; + clip: rect(0, 0, 0, 0); + word-wrap: normal; + border: 0; + } + +/* Place `[` and `]` around footnote references. */ +.text :global([data-footnote-ref])::before { + content: '['; +} + +.text :global([data-footnote-ref])::after { + content: ']'; +} + .textUncontained { max-height: none; } @@ -149,13 +177,36 @@ img.fullScreen { margin-bottom: 0; } -.text ul { +.text li+li { + margin-top: .25rem; +} + +.text ul, +.text ol { + margin-top: 0; + margin-bottom: 1rem; + padding-left: 2rem; +} + +.text ul:last-child, .text ol:last-child { margin-bottom: 0; } -.text li { - margin-top: .5rem; - margin-bottom: .5rem; +.text li > .p { + margin-top: 0.5rem; + margin-bottom: 0.5rem; +} + +.text ol ol, +.text ul ol { + list-style-type: lower-roman; +} + +.text ul ul ol, +.text ul ol ol, +.text ol ul ol, +.text ol ol ol { + list-style-type: lower-alpha; } .text h1 {