From 323ea44d3c97a92069e29d18343226bb2b779f0b Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Tue, 19 Nov 2024 12:34:17 +1100 Subject: [PATCH] Synchronize CSS --- v3.css | 117 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 55 deletions(-) diff --git a/v3.css b/v3.css index c4c8320d..253434c9 100644 --- a/v3.css +++ b/v3.css @@ -355,25 +355,26 @@ svg[font-family~="monospace" i], svg [font-family~="monospace" i] { ol, ul { padding: 0; margin: 0 0 0.5em 2em; -} -:is(ol, ul) :is(ol, ul) { - margin-left: 1em; + & :is(ol, ul) { + margin-left: 1em; + } } li { margin: 0 0 0.25em 0; } -.ulCompact li { - margin: 0; -} ul.empty, .ulEmpty { list-style-type: none; -} -ul.empty li, .ulEmpty li { - margin-top: 0.5em; + & li { + margin-top: 0.5em; + } } :is(ul, ol).compact, .ulCompact, .olCompact { - line-height: 1; margin: 0 0 0 2em; + & li { + margin: 0; + p:first-child { margin-top: 0; } + p:last-child { margin-bottom: 0; } + } } /* definition lists */ @@ -381,38 +382,39 @@ dl { clear: left; --indent: 3ch; /* --indent: attr(indent ch); not supported in any browser, but we can dream */ -} -dl.olPercent { - --indent: 5ch; + &.olPercent { + --indent: 5ch; + & > dt { + min-width: calc(var(--indent) - 2ch); + } + } + &.olPercent > dt { + float: none; + } + + dl > dd > & { + margin-top: 0.5em; + margin-bottom: 0; + } } dl > dt { float: left; margin-right: 2ch; min-width: 8ch; } -dl.dlNewline > dt { - float: none; -} dl > dd { margin-bottom: .8em; margin-left: var(--indent) !important; /* stupid element overrides */ min-height: 2ex; } -dl.olPercent > dt { - min-width: calc(var(--indent) - 2ch); -} :is(dl.compact, .dlCompact) > dd { margin-bottom: 0; -} -:is(dl.compact, .dlCompact) > dd > :is(:first-child, .break:first-child + *) { - margin-top: 0; -} -:is(dl.compact, .dlCompact) > dd > :is(:last-child) { - margin-bottom: 0; -} -dl > dd > dl { - margin-top: 0.5em; - margin-bottom: 0; + & > :is(:first-child, .break:first-child + *) { + margin-top: 0; + } + & > :is(:last-child) { + margin-bottom: 0; + } } :is(dd, span).break { display: none; @@ -574,9 +576,11 @@ a.pilcrow { margin-left: 3px; opacity: 0.2; user-select: none; + &[href] { + color: var(--pilcrow-weak); + &:hover { text-decoration: none; } + } } -a.pilcrow[href] { color: var(--pilcrow-weak); } -a.pilcrow[href]:hover { text-decoration: none; } @media not print { :hover > a.pilcrow { opacity: 1; @@ -656,6 +660,23 @@ sub, sup { #toc { padding: 0.75em 0 2em 0; margin-bottom: 1em; + + & nav { + & ul { + margin: 0 0.5em 0 0; + padding: 0; + list-style: none; + } + & li { + line-height: 1.3em; + margin: 2px 0; + padding-left: 1.2em; + text-indent: -1.2em; + } + } + & a.xref { + white-space: normal; + } } @media screen { #toc nav { @@ -663,20 +684,6 @@ sub, sup { font-weight: 360; } } -#toc nav ul { - margin: 0 0.5em 0 0; - padding: 0; - list-style: none; -} -#toc nav li { - line-height: 1.3em; - margin: 2px 0; - padding-left: 1.2em; - text-indent: -1.2em; -} -#toc a.xref { - white-space: normal; -} /* references */ .references dt { text-align: right; @@ -711,16 +718,16 @@ sub, sup { address.vcard { font-style: normal; margin: 1em 0; -} -address.vcard .nameRole { - font-weight: 700; - margin-left: 0; -} -address.vcard .label { - margin: 0.5em 0; -} -address.vcard .type { - display: none; + & .nameRole { + font-weight: 700; + margin-left: 0; + } + & .label { + margin: 0.5em 0; + } + & .type { + display: none; + } } .alternative-contact { margin: 1.5em 0 1em;