2022-12-03 21:40:21 +00:00
|
|
|
h2.heading {
|
2024-09-26 22:54:41 +00:00
|
|
|
border-block-end: 1px solid var(--ui-text-muted);
|
|
|
|
padding-block-end: 1rem;
|
2022-12-03 21:40:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* headings with no numbers */
|
|
|
|
|
|
|
|
article:not([autonumbering]) .heading {
|
|
|
|
position: relative;
|
2024-09-26 22:54:41 +00:00
|
|
|
margin-inline-end: 2.5rem;
|
2022-12-03 21:40:21 +00:00
|
|
|
&__anchor-link {
|
|
|
|
display: inline-flex;
|
|
|
|
align-content: center;
|
2024-09-26 22:54:41 +00:00
|
|
|
margin-inline-start: 0.25em;
|
2022-12-03 21:40:21 +00:00
|
|
|
position: absolute;
|
2024-09-26 22:54:41 +00:00
|
|
|
inset-inline-end: -2.5rem;
|
|
|
|
inset-block-start: 3px;
|
2022-12-03 21:40:21 +00:00
|
|
|
font-size: 1rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* headings with autonumbering support */
|
|
|
|
|
|
|
|
body {counter-reset: h2}
|
|
|
|
h2 {counter-reset: h3}
|
|
|
|
h3 {counter-reset: h4}
|
|
|
|
h4 {counter-reset: h5}
|
|
|
|
|
|
|
|
article[autonumbering] {
|
|
|
|
h2:before {
|
|
|
|
counter-increment: h2;
|
|
|
|
content: counter(h2) " ";
|
|
|
|
}
|
|
|
|
h3:before {
|
|
|
|
counter-increment: h3;
|
|
|
|
content: counter(h2) "." counter(h3) " ";
|
|
|
|
}
|
|
|
|
h4:before {
|
|
|
|
counter-increment: h4;
|
|
|
|
content: counter(h2) "." counter(h3) "." counter(h4) " ";
|
|
|
|
}
|
|
|
|
h2:before,
|
|
|
|
h3:before,
|
|
|
|
h4:before
|
|
|
|
{
|
2024-09-26 22:54:41 +00:00
|
|
|
margin-inline-end: 1em;
|
2022-12-03 21:40:21 +00:00
|
|
|
font-family: monospace;
|
|
|
|
font-size: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.heading {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr auto;
|
|
|
|
grid-template-rows: auto auto;
|
|
|
|
grid-gap: 0.5rem;
|
|
|
|
&__text {
|
|
|
|
grid-column: span 2;
|
|
|
|
}
|
|
|
|
&__anchor-link {
|
|
|
|
font-size: 1rem;
|
|
|
|
grid-column: 2;
|
|
|
|
grid-row: 1;
|
|
|
|
justify-self: end;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#TableOfContents :is(ol, ul) {
|
2024-09-26 22:54:41 +00:00
|
|
|
/*
|
|
|
|
each list gets a new counter
|
|
|
|
*/
|
2022-12-03 21:40:21 +00:00
|
|
|
counter-reset: item;
|
2024-09-26 22:54:41 +00:00
|
|
|
margin-inline-start: 0;
|
2022-12-03 21:40:21 +00:00
|
|
|
}
|
|
|
|
#TableOfContents li:before {
|
2024-09-26 22:54:41 +00:00
|
|
|
/*
|
|
|
|
the counter is added as a pseudo-element,
|
|
|
|
and nested counters are joined by a dot
|
|
|
|
*/
|
|
|
|
content: counters(item, ".") " ";
|
2022-12-03 21:40:21 +00:00
|
|
|
counter-increment: item;
|
2024-09-26 22:54:41 +00:00
|
|
|
/* ensure the counters align visually */
|
2022-12-03 21:40:21 +00:00
|
|
|
font-family: monospace;
|
2024-09-26 22:54:41 +00:00
|
|
|
font-weight: bold;
|
|
|
|
margin-inline-end: 1em;
|
2022-12-03 21:40:21 +00:00
|
|
|
}
|
2024-09-26 22:54:41 +00:00
|
|
|
#TableOfContents > ul > li {
|
|
|
|
/*
|
|
|
|
top-level items wrap after the number,
|
|
|
|
in order to add some visual separation
|
|
|
|
*/
|
|
|
|
display: flex;
|
|
|
|
flex-flow: column;
|
2022-12-03 21:40:21 +00:00
|
|
|
}
|
|
|
|
}
|