Skip to content

Commit 17dab0d

Browse files
julianbakerclaude
andcommitted
Lift carousel edge-fade overlays above card stacking context
Card hover/shadow styling can promote a card to its own stacking context, which makes the fade overlay paint underneath that card despite DOM order. Explicit z-index on both overlays keeps them reliably on top. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 570d045 commit 17dab0d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • packages/web/src/pages/search-explore-page/components/desktop

packages/web/src/pages/search-explore-page/components/desktop/Carousel.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,11 @@ export const Carousel = forwardRef<HTMLDivElement, CarouselProps>(
305305
background: `linear-gradient(to right, ${pageBg}, transparent)`,
306306
pointerEvents: 'none',
307307
opacity: canScrollLeft ? 1 : 0,
308-
transition: 'opacity 150ms ease-out'
308+
transition: 'opacity 150ms ease-out',
309+
// Card hover/shadow styling can promote individual cards to
310+
// their own stacking context; explicit z-index keeps the
311+
// fade overlay reliably on top of any card paint.
312+
zIndex: 2
309313
}}
310314
/>
311315
<Box
@@ -319,7 +323,8 @@ export const Carousel = forwardRef<HTMLDivElement, CarouselProps>(
319323
background: `linear-gradient(to left, ${pageBg}, transparent)`,
320324
pointerEvents: 'none',
321325
opacity: canScrollRight ? 1 : 0,
322-
transition: 'opacity 150ms ease-out'
326+
transition: 'opacity 150ms ease-out',
327+
zIndex: 2
323328
}}
324329
/>
325330
</>

0 commit comments

Comments
 (0)