fix(toc): update max-height calculation for TOC content to use variable

This commit is contained in:
Cell
2026-04-07 11:32:12 +08:00
parent 29ece68332
commit 66dc7bc5af
2 changed files with 4 additions and 7 deletions
+3 -5
View File
@@ -18,15 +18,13 @@
background-color: light-dark(#f1f1f1, #1e1e1f);
&:hover,
&:active {
&:active,
&:focus {
outline: none;
color: fixit-var(global-font-color);
cursor: pointer;
}
&:focus-visible {
outline: -webkit-focus-ring-color auto 1px;
}
@include media('print') {
display: none !important;
}
+1 -2
View File
@@ -122,8 +122,7 @@
.toc-content {
overflow-y: auto;
overscroll-behavior: contain;
// TODO 这里计算错误,待重构使用 JS 计算
max-height: calc(100vh - #{2 * #{fixit-var(header-height)}});
max-height: fixit-var(toc-content-max-height, calc(100dvh - #{2 * #{fixit-var(header-height)}}));
@include scrollbar-width(none, 0);
&.always-active ul,