From 66dc7bc5af09be60eab302c69c757be169b59ce5 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Tue, 7 Apr 2026 11:32:12 +0800 Subject: [PATCH] fix(toc): update max-height calculation for TOC content to use variable --- assets/css/_core/_widgets/_fixed-button.scss | 8 +++----- assets/css/_page/_single/_toc.scss | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/assets/css/_core/_widgets/_fixed-button.scss b/assets/css/_core/_widgets/_fixed-button.scss index 59a41edd..7a2c7797 100644 --- a/assets/css/_core/_widgets/_fixed-button.scss +++ b/assets/css/_core/_widgets/_fixed-button.scss @@ -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; } diff --git a/assets/css/_page/_single/_toc.scss b/assets/css/_page/_single/_toc.scss index 9626e9cc..b4da861a 100644 --- a/assets/css/_page/_single/_toc.scss +++ b/assets/css/_page/_single/_toc.scss @@ -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,