From a000d1c1b91e2941221454358a64884988de44bf Mon Sep 17 00:00:00 2001 From: Lee Cattarin Date: Mon, 21 Sep 2026 15:55:44 -0700 Subject: [PATCH] i'm not happy with this but it's better for width --- css/post-toc.css | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/css/post-toc.css b/css/post-toc.css index f5e2d747..4a9b8bbd 100644 --- a/css/post-toc.css +++ b/css/post-toc.css @@ -1,9 +1,8 @@ #toc { float: right; margin: 1rem 0 1.5rem 1.5rem; - /* 23rem is the width of the words 'table of contents' in my header font */ - /* yes, it's a bit hacky */ - width: min(calc(100% - 1.5rem), 23rem); + width: fit-content; + max-width: 55%; } @media (max-width: 850px) { @@ -12,6 +11,7 @@ margin-top: 2rem; margin-left: .5rem; width: calc(100% - .5rem); + max-width: unset; } } @@ -30,6 +30,7 @@ background: var(--color-bg); border-radius: .5rem; cursor: pointer; + padding-inline-end: .25rem; } #toc summary:focus-visible { @@ -53,7 +54,7 @@ /* `tree` style toc */ #toc nav > ol { - margin-left: 1rem; + margin-inline: 1rem; } #toc ol {