Feat: Prevent ToC flicker on initial load

Use CSS to control ToC height instead of JavaScript to prevent flickering.
This commit is contained in:
ZhenShuo Leo
2025-05-05 08:30:34 +08:00
parent 6fb8b945d7
commit c59cb293bf
3 changed files with 15 additions and 31 deletions

View File

@@ -63,6 +63,12 @@ body button {
max-width: 25vw;
}
#TOCView {
max-height: calc(100vh - 150px);
min-height: 0;
overflow-x: hidden;
}
.toc ul,
.toc li {
@apply px-0 leading-snug list-none;