Skip to content

Commit b63d876

Browse files
committed
fix: enhance tooltip styling to include selection background and text color for improved accessibility
1 parent 09bfb47 commit b63d876

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/ui/tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function TooltipContent({
9090
const mode: HybridMode = ctx?.mode ?? "tooltip";
9191

9292
const baseClasses =
93-
"group fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit animate-in whitespace-normal break-words max-w-[calc(100vw-2rem)] rounded-md bg-primary px-3 py-1.5 text-primary-foreground text-xs outline-hidden data-[state=closed]:animate-out";
93+
"group fade-in-0 zoom-in-95 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit animate-in whitespace-normal break-words max-w-[calc(100vw-2rem)] rounded-md bg-primary px-3 py-1.5 text-primary-foreground text-xs outline-hidden data-[state=closed]:animate-out selection:bg-background selection:text-foreground";
9494
const originClass =
9595
mode === "tooltip"
9696
? "origin-(--radix-tooltip-content-transform-origin)"

0 commit comments

Comments
 (0)