i'm not happy with this but it's better for width
continuous-integration/drone/push Build is passing

This commit is contained in:
inherentlee committed 2026-09-21 15:55:44 -07:00
1 parent cf26b06e3d
commit a000d1c1b9
1 file changed
+5 -4
+5 -4
View File
@@ -1,9 +1,8 @@
#toc { #toc {
float: right; float: right;
margin: 1rem 0 1.5rem 1.5rem; margin: 1rem 0 1.5rem 1.5rem;
/* 23rem is the width of the words 'table of contents' in my header font */ width: fit-content;
/* yes, it's a bit hacky */ max-width: 55%;
width: min(calc(100% - 1.5rem), 23rem);
} }
@media (max-width: 850px) { @media (max-width: 850px) {
@@ -12,6 +11,7 @@
margin-top: 2rem; margin-top: 2rem;
margin-left: .5rem; margin-left: .5rem;
width: calc(100% - .5rem); width: calc(100% - .5rem);
max-width: unset;
} }
} }
@@ -30,6 +30,7 @@
background: var(--color-bg); background: var(--color-bg);
border-radius: .5rem; border-radius: .5rem;
cursor: pointer; cursor: pointer;
padding-inline-end: .25rem;
} }
#toc summary:focus-visible { #toc summary:focus-visible {
@@ -53,7 +54,7 @@
/* `tree` style toc */ /* `tree` style toc */
#toc nav > ol { #toc nav > ol {
margin-left: 1rem; margin-inline: 1rem;
} }
#toc ol { #toc ol {