Skip to content

Commit a8acc79

Browse files
sktbrdclaude
andauthored
fix(stake): style the stake dialog's scrollbar (#254)
The dialog is taller than the viewport, so it scrolls. Unstyled, it drew the platform default — on macOS with "always show scrollbars" that is a wide light-grey track running down the inside of a rounded dark panel, reading as a browser artifact stuck onto the design rather than part of it. Same recipe BountyCardFan already uses (thin, rounded WebKit thumb, transparent track) with one change: its thumb is `bg-white/15`, and this surface is `bg-background`, which follows the theme — a fixed white thumb would vanish on a light page. `foreground/20` inverts with it, `/30` on hover. Measured on the open dialog, classes on vs off: the reserved gutter drops from 19px to 15px and `::-webkit-scrollbar` width from `auto` to 6px. Worth knowing that 6px is not the whole story — the gutter implies the engine still reserves more than the declared width, so this makes the bar quiet rather than exactly 6px wide. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 5ee4273 commit a8acc79

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/components/stake/GnarsStakeDialog.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,17 @@ export function GnarsStakeDialog({ open, onOpenChange }: Props) {
113113

114114
return (
115115
<Dialog open={open} onOpenChange={onOpenChange}>
116-
<DialogContent className="max-h-[92vh] w-[calc(100%-2rem)] gap-0 overflow-y-auto rounded-3xl border-emerald-500/25 bg-background p-0 sm:max-w-[720px]">
116+
{/* The dialog is taller than the viewport, so it scrolls. Left unstyled it
117+
draws the platform's default bar — on macOS with "always show
118+
scrollbars" that is a wide light-grey track running down the inside of
119+
a rounded dark panel, which reads as a browser artifact rather than
120+
part of the panel.
121+
122+
Same recipe BountyCardFan already uses (thin + rounded WebKit thumb),
123+
with one change: its thumb is `bg-white/15`, and this surface is
124+
`bg-background`, which follows the theme — a fixed white thumb would
125+
vanish on a light page. `foreground/20` inverts with it. */}
126+
<DialogContent className="max-h-[92vh] w-[calc(100%-2rem)] gap-0 overflow-y-auto rounded-3xl border-emerald-500/25 bg-background p-0 [scrollbar-width:thin] sm:max-w-[720px] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-foreground/20 [&::-webkit-scrollbar-thumb:hover]:bg-foreground/30 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5">
117127
<div className="flex flex-col gap-6 p-6 sm:p-8">
118128
{/* Header */}
119129
<div className="pr-6">

0 commit comments

Comments
 (0)