Skip to content

Commit 4ce8d77

Browse files
interacseanclaude
andcommitted
fix: anchor scroll-fade to page backdrop (--shell-gradient-base)
Themes with a gradient page background (bloom, cream) anchor it to --shell-gradient-base, which differs from --background (e.g. bloom dark: 9,10,17 vs 10,10,10). Fading to --background left a faint seam against the tinted backdrop. Fade to --shell-gradient-base instead, with --background as a fallback for themes that don't define it (default). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 8b17fbd commit 4ce8d77

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

packages/core/src/components/sidebar/sidebar-layout.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,11 @@ export const SidebarLayout = (props: SidebarLayoutProps) => {
124124
>
125125
{/* Scroll-fade: a sticky strip that rides the top of the scroll
126126
viewport so content dissolves into the pinned breadcrumb rather
127-
than cutting off. It's a seamless gradient from the theme
128-
background at full opacity to the SAME colour at zero alpha —
129-
using relative-colour syntax rather than `transparent` (which is
127+
than cutting off. It's a seamless gradient from the page
128+
backdrop colour (--shell-gradient-base, which themes with a
129+
gradient page background anchor to; falls back to --background)
130+
at full opacity to the SAME colour at zero alpha — using
131+
relative-colour syntax rather than `transparent` (which is
130132
black·0 and would band to grey on light themes). h-8 with -mb-12
131133
cancels its own height plus the flex gap so it adds no layout
132134
space; it fades in once scrolled and is inert to pointer
@@ -135,7 +137,7 @@ export const SidebarLayout = (props: SidebarLayoutProps) => {
135137
aria-hidden
136138
style={{
137139
backgroundImage:
138-
"linear-gradient(to bottom, var(--background), rgb(from var(--background) r g b / 0))",
140+
"linear-gradient(to bottom, var(--shell-gradient-base, var(--background)), rgb(from var(--shell-gradient-base, var(--background)) r g b / 0))",
139141
}}
140142
className="astw:pointer-events-none astw:sticky astw:top-0 astw:z-10 astw:-mb-12 astw:h-8 astw:shrink-0 astw:opacity-0 astw:transition-opacity astw:duration-200 astw:group-data-[scrolled]/scroll:opacity-100"
141143
/>

0 commit comments

Comments
 (0)