From e89e3cf0a4516ded2f7cd7ff44bcd7555f384ae9 Mon Sep 17 00:00:00 2001 From: Anthony Lio Date: Thu, 5 Nov 2026 09:03:38 +0200 Subject: [PATCH] style(ui): tighten tooltip side padding (#52977) ## Problem - tooltip has 12px side padding and 6px top padding, so a short tooltip looks wide ## Solution - changes the shared tooltip side padding from 12px to 8px, so tooltip content sits closer to the edge in every app | before | after | | -------|------| | image | image | ## Review instructions 1. open the live and preview links of the design system tooltip page side by side 2. hover each example tooltip, and make sure that the side padding is smaller and that the text does not touch the border 3. hover a few tooltips in the studio preview, and make sure that long tooltip text still wraps inside the tooltip ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --- packages/ui/src/components/shadcn/ui/tooltip.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/components/shadcn/ui/tooltip.tsx b/packages/ui/src/components/shadcn/ui/tooltip.tsx index 8839448e860..487669abc52 100644 --- a/packages/ui/src/components/shadcn/ui/tooltip.tsx +++ b/packages/ui/src/components/shadcn/ui/tooltip.tsx @@ -32,7 +32,7 @@ const TooltipContent = React.forwardRef< sideOffset={sideOffset} {...props} className={cn( - 'z-50 overflow-hidden rounded-md border bg-alternative px-3 py-1.5 text-xs text-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1', + 'z-50 overflow-hidden rounded-md border bg-alternative px-2 py-1.5 text-xs text-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1', className )} />