fix(ui): unify scrollbar styles across scrollable containers

Add .scrollbar-thin and .scrollbar-thin-edge utility classes in
globals.css and apply them to sidebar, file tree, git changes,
git log, session files, diff preview, and message thread panels.
Replace scattered inline webkit-scrollbar overrides with the
shared classes for consistent appearance and gutter behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
xintaofei
2026-04-09 18:50:14 +08:00
parent 56cd207801
commit 150b927610
9 changed files with 32 additions and 19 deletions

View File

@@ -174,6 +174,22 @@
}
}
/* Unified scrollbar style for scrollable containers.
Matches StickToBottom's internal scrollbar-gutter so all scroll areas
behave the same: symmetric gutter, no layout shift. */
.scrollbar-thin {
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
scrollbar-gutter: stable both-edges;
}
/* Single-edge variant: only reserves space on the scrollbar side */
.scrollbar-thin-edge {
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
scrollbar-gutter: stable;
}
/* Streamdown code blocks: dark mode via shiki dual-theme CSS variables */
.dark [data-streamdown="code-block-body"] {
background-color: var(--shiki-dark-bg, var(--sdm-bg, transparent)) !important;