From b39deab0073ffcae54587f48e1caed4827018d81 Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Thu, 22 Jan 2026 15:45:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=A1=8C=E9=9D=A2?= =?UTF-8?q?=E7=AB=AF=E9=9D=9E=E5=81=9C=E9=9D=A0=E7=8A=B6=E6=80=81=E6=97=B6?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E6=BB=9A=E5=8A=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 站点详情(leftbar_part2)在非停靠状态时不再有滚动条 - 站点详情只在停靠(sticky)状态时才启用滚动 - TODO栏(leftbar_part3)在非停靠状态时也有滚动条和高度限制 - TODO栏智能限制最大高度为50vh,内容超出时可滚动 - 添加TODO栏滚动条样式,与站点详情保持一致 - 删除重复的card-body样式定义 --- style.css | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/style.css b/style.css index 6ca5e81..f90718b 100644 --- a/style.css +++ b/style.css @@ -2532,12 +2532,13 @@ html.navbar-absolute #leftbar_part2.sticky { } #leftbar_part2_inner { - max-height: calc(100vh - 110px - var(--leftbar-part3-height, 0px)); - overflow-y: auto; padding: 10px; } -#leftbar_part2_inner::-webkit-scrollbar { +#leftbar_part2.sticky #leftbar_part2_inner { + max-height: calc(100vh - 110px - var(--leftbar-part3-height, 0px)); + overflow-y: auto; +} width: 6px; @@ -12486,6 +12487,10 @@ article .post-content .huhua a:before { #leftbar_part3 { margin-top: 10px; transition: top 0.3s ease, transform 0.3s ease; + max-height: 50vh; + overflow: hidden; + display: flex; + flex-direction: column; } #leftbar_part3.sticky { @@ -12493,15 +12498,36 @@ article .post-content .huhua a:before { top: calc(80px + var(--leftbar-part2-height, 300px)); width: 240px; max-height: var(--leftbar-part3-max-height, 50vh); - overflow: hidden; - display: flex; - flex-direction: column; } -#leftbar_part3.sticky .card-body { +#leftbar_part3 .card-body { overflow-y: auto; flex: 1; min-height: 0; + padding: 12px 16px; +} + +#leftbar_part3 .card-body::-webkit-scrollbar { + width: 6px; +} + +#leftbar_part3 .card-body::-webkit-scrollbar-track { + background: transparent; +} + +#leftbar_part3 .card-body::-webkit-scrollbar-thumb { + border-width: 1px; + background-color: rgba(0, 0, 0, 0.2); +} + +html.darkmode #leftbar_part3 .card-body::-webkit-scrollbar-thumb { + border-width: 1px; + background-color: rgba(255, 255, 255, 0.2); +} + +#leftbar_part3 .card-body::-webkit-scrollbar-button { + height: 5px; + pointer-events: none; } body.leftbar-can-headroom.headroom---unpinned #leftbar_part3.sticky { @@ -12522,10 +12548,6 @@ html.navbar-absolute #leftbar_part3.sticky { } } -#leftbar_part3 .card-body { - padding: 12px 16px; -} - .todo-title { display: flex; align-items: center;