Skip to content

Commit 57d7746

Browse files
fix(web): replace turn strip overlay gradients with mask-image fade (#1949)
1 parent 850c912 commit 57d7746

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

apps/web/src/components/DiffPanel.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -429,12 +429,6 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
429429
const headerRow = (
430430
<>
431431
<div className="relative min-w-0 flex-1 [-webkit-app-region:no-drag]">
432-
{canScrollTurnStripLeft && (
433-
<div className="pointer-events-none absolute inset-y-0 left-8 z-10 w-7 bg-linear-to-r from-card to-transparent" />
434-
)}
435-
{canScrollTurnStripRight && (
436-
<div className="pointer-events-none absolute inset-y-0 right-8 z-10 w-7 bg-linear-to-l from-card to-transparent" />
437-
)}
438432
<button
439433
type="button"
440434
className={cn(
@@ -466,6 +460,13 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
466460
<div
467461
ref={turnStripRef}
468462
className="turn-chip-strip flex gap-1 overflow-x-auto px-8 py-0.5"
463+
style={
464+
canScrollTurnStripLeft || canScrollTurnStripRight
465+
? {
466+
maskImage: `linear-gradient(to right, ${canScrollTurnStripLeft ? "transparent 24px, black 72px" : "black"}, ${canScrollTurnStripRight ? "black calc(100% - 72px), transparent calc(100% - 24px)" : "black"})`,
467+
}
468+
: undefined
469+
}
469470
onWheel={onTurnStripWheel}
470471
>
471472
<button

0 commit comments

Comments
 (0)