Skip to content

Commit 11601da

Browse files
fix(web): chat text no longer shows through a 1px gap under composer banners (#10635)
Co-authored-by: Claude Fable 5 <[email protected]>
1 parent 1f14d6d commit 11601da

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/web/src/components/chat/ComposerBanner.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ function Surface({
5656
: "[--chat-composer-attachment-overlap:0px] before:rounded-[1rem]",
5757
"before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:border before:border-(--chat-composer-attached-outline)",
5858
"before:bg-[color-mix(in_srgb,var(--chat-composer-attached-surface)_var(--glass-opacity),transparent)] before:bg-[linear-gradient(var(--chat-composer-attached-tint),var(--chat-composer-attached-tint))] before:backdrop-blur-(--glass-blur) before:backdrop-saturate-(--glass-saturation)",
59-
"before:mask-[linear-gradient(to_top,transparent_0_var(--chat-composer-attachment-overlap),black_var(--chat-composer-attachment-overlap))] before:shadow-[0_12px_28px_-18px_rgb(0_0_0/40%)] dark:before:shadow-[0_14px_32px_-18px_rgb(0_0_0/75%)]",
59+
// The mask cut-off bleeds one pixel past the seam: Chromium drops the last
60+
// device-pixel row of a filtered backdrop when the cut-off lands off the
61+
// device-pixel grid, and the composer's surface starts exactly there. The
62+
// composer's own glass covers the extra row, so the overlap never shows.
63+
"before:mask-[linear-gradient(to_top,transparent_0_calc(var(--chat-composer-attachment-overlap)-1px),black_calc(var(--chat-composer-attachment-overlap)-1px))] before:shadow-[0_12px_28px_-18px_rgb(0_0_0/40%)] dark:before:shadow-[0_14px_32px_-18px_rgb(0_0_0/75%)]",
6064
"dark:supports-[(backdrop-filter:blur(1px))_or_(-webkit-backdrop-filter:blur(1px))]:before:bg-[linear-gradient(var(--chat-composer-attached-tint),var(--chat-composer-attached-tint)),linear-gradient(to_top,transparent_0_var(--chat-composer-attachment-overlap),rgb(0_0_0/18%)_var(--chat-composer-attachment-overlap),transparent_calc(var(--chat-composer-attachment-overlap)+10px))]",
6165
"not-supports-[((backdrop-filter:blur(1px))_or_(-webkit-backdrop-filter:blur(1px)))]:before:bg-(--chat-composer-attached-surface)",
6266
className,

0 commit comments

Comments
 (0)