fix(frontend): remove scrollbar-gutter and restore padding for scroll containers
Drop `scrollbar-gutter: stable both-edges` / `stable` from `.scrollbar-thin` and `.scrollbar-thin-edge` so scrollbars overlay content without reserving space, fixing layout inconsistencies between overlay and classic scrollbar environments. Restore padding that was previously reduced to compensate for the gutter: `px-1` to `px-3` in git-log-tab, `px-2` to `px-4` in virtualized-message-thread, and add `px-2` to sidebar-conversation-list and session-files-tab. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1003,19 +1003,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Unified scrollbar style for scrollable containers.
|
/* Unified scrollbar style for scrollable containers.
|
||||||
Matches StickToBottom's internal scrollbar-gutter so all scroll areas
|
Thin overlay scrollbar — no gutter reserved, no layout shift. */
|
||||||
behave the same: symmetric gutter, no layout shift. */
|
.scrollbar-thin,
|
||||||
.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-thin-edge {
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
scrollbar-color: var(--border) transparent;
|
scrollbar-color: var(--border) transparent;
|
||||||
scrollbar-gutter: stable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Streamdown code blocks: dark mode via shiki dual-theme CSS variables */
|
/* Streamdown code blocks: dark mode via shiki dual-theme CSS variables */
|
||||||
|
|||||||
@@ -482,7 +482,7 @@ export function SidebarConversationList({
|
|||||||
<div
|
<div
|
||||||
ref={scrollContainerRef}
|
ref={scrollContainerRef}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex-1 min-h-0 overflow-y-auto scrollbar-thin",
|
"flex-1 min-h-0 overflow-y-auto scrollbar-thin px-2",
|
||||||
"[overflow-anchor:none]"
|
"[overflow-anchor:none]"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -903,7 +903,7 @@ export function GitLogTab() {
|
|||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-full overflow-y-auto scrollbar-thin px-1 py-3">
|
<div className="flex flex-col h-full overflow-y-auto scrollbar-thin px-3 py-3">
|
||||||
{hasBranches && (
|
{hasBranches && (
|
||||||
<BranchSelector
|
<BranchSelector
|
||||||
branchList={branchList}
|
branchList={branchList}
|
||||||
@@ -929,7 +929,7 @@ export function GitLogTab() {
|
|||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-full overflow-y-auto scrollbar-thin px-1 py-3">
|
<div className="flex flex-col h-full overflow-y-auto scrollbar-thin px-3 py-3">
|
||||||
{hasBranches && (
|
{hasBranches && (
|
||||||
<BranchSelector
|
<BranchSelector
|
||||||
branchList={branchList}
|
branchList={branchList}
|
||||||
@@ -959,7 +959,7 @@ export function GitLogTab() {
|
|||||||
|
|
||||||
if (entries.length === 0) {
|
if (entries.length === 0) {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-full overflow-y-auto scrollbar-thin px-1 py-3">
|
<div className="flex flex-col h-full overflow-y-auto scrollbar-thin px-3 py-3">
|
||||||
{hasBranches && (
|
{hasBranches && (
|
||||||
<BranchSelector
|
<BranchSelector
|
||||||
branchList={branchList}
|
branchList={branchList}
|
||||||
@@ -985,7 +985,7 @@ export function GitLogTab() {
|
|||||||
<ContextMenuTrigger asChild>
|
<ContextMenuTrigger asChild>
|
||||||
<div
|
<div
|
||||||
onScroll={handleScroll}
|
onScroll={handleScroll}
|
||||||
className="flex-1 min-h-0 overflow-y-auto scrollbar-thin px-1 py-3 space-y-3"
|
className="flex-1 min-h-0 overflow-y-auto scrollbar-thin px-3 py-3 space-y-3"
|
||||||
>
|
>
|
||||||
{hasBranches && (
|
{hasBranches && (
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ export function SessionFilesTab() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col h-full">
|
<div className="flex flex-col h-full">
|
||||||
<div className="flex-1 min-h-0 overflow-y-auto scrollbar-thin">
|
<div className="flex-1 min-h-0 overflow-y-auto scrollbar-thin px-2">
|
||||||
<SessionFilesContent conversationId={conversationId} />
|
<SessionFilesContent conversationId={conversationId} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export function VirtualizedMessageThread<T>({
|
|||||||
key={getItemKey(item, index)}
|
key={getItemKey(item, index)}
|
||||||
style={itemStyle(index, items.length)}
|
style={itemStyle(index, items.length)}
|
||||||
>
|
>
|
||||||
<div className={cn("mx-auto max-w-3xl px-2", className)}>
|
<div className={cn("mx-auto max-w-3xl px-4", className)}>
|
||||||
{renderItem(item, index)}
|
{renderItem(item, index)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user