fix(ui): reserve scrollbar gutter in public TOC so it doesn't overlay text

This commit is contained in:
Pontoporeia
2026-09-18 16:26:36 +02:00
parent fc66b37801
commit bdde7173ea
2 changed files with 11 additions and 0 deletions
+8
View File
@@ -126,6 +126,14 @@
max-height: calc(100vh - var(--space-xl) - var(--space-2xl));
overflow-y: auto;
overscroll-behavior: contain;
/* Reserve right gutter on the scroll container itself (padding, not
margin) so the native scrollbar never overlays the TOC text. */
padding-right: var(--space-3xs);
}
/* Keep the caret/summary aligned with the reserved gutter */
.toc summary {
padding-right: var(--space-3xs);
}
.toc summary {