2026-09-20 15:07:49 -07:00
|
|
|
#toc {
|
|
|
|
|
float: right;
|
|
|
|
|
margin: 1rem 0 1.5rem 1.5rem;
|
2026-09-20 18:46:09 -07:00
|
|
|
/* 23rem is the width of the words 'table of contents' in my header font */
|
|
|
|
|
/* yes, it's a bit hacky */
|
2026-09-20 15:07:49 -07:00
|
|
|
width: min(calc(100% - 1.5rem), 23rem);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 850px) {
|
|
|
|
|
#toc {
|
|
|
|
|
float: unset;
|
|
|
|
|
margin-top: 2rem;
|
|
|
|
|
margin-left: .5rem;
|
|
|
|
|
width: calc(100% - .5rem);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#toc details {
|
|
|
|
|
border: thick solid var(--color-pink);
|
|
|
|
|
border-radius: 1rem;
|
|
|
|
|
margin-top: 1rem;
|
2026-09-20 19:01:54 -07:00
|
|
|
background-color: var(--color-bg);
|
2026-09-20 15:07:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#toc summary {
|
|
|
|
|
position: relative;
|
|
|
|
|
top: -1.5rem;
|
|
|
|
|
left: -.75rem;
|
|
|
|
|
width: fit-content;
|
|
|
|
|
background: var(--color-bg);
|
|
|
|
|
border-radius: .5rem;
|
2026-09-20 18:46:09 -07:00
|
|
|
cursor: pointer;
|
2026-09-20 15:07:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#toc summary:focus-visible {
|
|
|
|
|
outline: .15rem solid var(--color-teal);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#toc summary::marker {
|
|
|
|
|
font-size: 2.35rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#toc h2 {
|
|
|
|
|
margin-top: 0;
|
|
|
|
|
display: inline;
|
|
|
|
|
line-height: normal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#toc nav {
|
|
|
|
|
position: relative;
|
|
|
|
|
top: -1.25rem;
|
|
|
|
|
}
|
|
|
|
|
|
2026-09-20 18:50:52 -07:00
|
|
|
/* my baby my child my `tree` list style */
|
2026-09-20 18:46:09 -07:00
|
|
|
#toc ol,
|
2026-09-20 15:07:49 -07:00
|
|
|
#toc li {
|
2026-09-20 18:46:09 -07:00
|
|
|
margin-block: 0;
|
2026-09-20 15:07:49 -07:00
|
|
|
}
|
|
|
|
|
|
2026-09-20 18:46:09 -07:00
|
|
|
#toc ol {
|
|
|
|
|
margin-left: 0;
|
|
|
|
|
list-style: none;
|
2026-09-20 15:07:49 -07:00
|
|
|
}
|
|
|
|
|
|
2026-09-20 18:46:09 -07:00
|
|
|
#toc li {
|
|
|
|
|
border-left: .095rem solid var(--color-pink);
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
margin-left: 1.5rem;
|
2026-09-20 15:07:49 -07:00
|
|
|
}
|
|
|
|
|
|
2026-09-20 18:46:09 -07:00
|
|
|
#toc li::before {
|
|
|
|
|
content: '├─';
|
|
|
|
|
color: var(--color-pink);
|
|
|
|
|
position: relative;
|
|
|
|
|
left: -.34rem;
|
2026-09-20 15:07:49 -07:00
|
|
|
}
|
|
|
|
|
|
2026-09-20 18:46:09 -07:00
|
|
|
#toc li:last-child {
|
|
|
|
|
border-left-color: transparent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#toc li:last-child::before {
|
|
|
|
|
/* Technically, we could use this content for all of them, but doing the full
|
|
|
|
|
bar for the non-last-childs keeps the border a *smidge* more consistent for
|
|
|
|
|
different levels of magnification */
|
|
|
|
|
content: '└─';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* underlines are unnecessary in this context */
|
|
|
|
|
#toc a {
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
color: var(--color-blue);
|
|
|
|
|
font-weight: bold;
|
2026-09-20 15:07:49 -07:00
|
|
|
}
|