perf(ui): streamline overlay scrollbar updates

This commit is contained in:
c_w_xiaohei
2026-08-26 00:42:36 +08:00
parent cd179bd118
commit dd6a632bc5
4 changed files with 670 additions and 332 deletions
+9 -7
View File
@@ -652,28 +652,30 @@ html:not(.dark) .chat-scroll {
position: absolute;
inset: 0;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s ease;
/* Above sticky zone headers (z-20) — the thumb must never dive under
a stuck sidebar header while scrolling. */
z-index: 30;
}
.overlay-scrollbar--dense,
.overlay-scrollbar--bottom-right,
.overlay-scrollbar--zero,
.overlay-scrollbar--flush {
/* no-op: positioning handled inline */
.overlay-scrollbar[data-visible="true"] {
opacity: 1;
}
.overlay-scrollbar__thumb {
pointer-events: auto;
pointer-events: none;
position: absolute;
width: 6px;
background: var(--oc-scrollbar-thumb);
border-radius: 9999px;
opacity: 0.8;
transition: background-color 0.15s ease, opacity 0.15s ease;
will-change: transform, height;
will-change: transform;
}
.overlay-scrollbar[data-visible="true"] .overlay-scrollbar__thumb {
pointer-events: auto;
}
.overlay-scrollbar__thumb:hover,