diff --git a/apps/web/src/components/ui/toast.tsx b/apps/web/src/components/ui/toast.tsx index dd7a80d4ff749eeb323ceeb7ff62c7e134f2b9c6..f7035d87472df2cf3132702242aa051ba63403d8 100644 --- a/apps/web/src/components/ui/toast.tsx +++ b/apps/web/src/components/ui/toast.tsx @@ -206,7 +206,10 @@ function Toasts({ position = "top-right" }: { position: ToastPosition }) { "data-[position*=top]:after:top-full", "data-[position*=bottom]:after:bottom-full", // Define some variables - "[--toast-calc-height:var(--toast-frontmost-height,var(--toast-height))] [--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]", + // Base UI exposes a shared front-most height for the collapsed stack. + // If that shared measurement is briefly stale, long content can render + // outside the card until hover expands the toast and swaps to its own height. + "[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))] [--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]", // Define offset-y variable "data-[position*=top]:[--toast-calc-offset-y:calc(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap)+var(--toast-swipe-movement-y))]", "data-[position*=bottom]:[--toast-calc-offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--toast-gap)*-1+var(--toast-swipe-movement-y))]", @@ -258,7 +261,7 @@ function Toasts({ position = "top-right" }: { position: ToastPosition }) { "not-data-expanded:pointer-events-none not-data-expanded:opacity-0", )} > -
+
{Icon && (
)} -
- +
+
{toast.actionProps && ( - + {toast.actionProps.children} )} @@ -341,7 +350,7 @@ function AnchoredToasts() { ) : ( -
+
{Icon && (
)} -
- +
+
{toast.actionProps && ( {toast.actionProps.children}