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 |
| -------|------|
| <img width="357" height="162" alt="image"
src="https://github.com/user-attachments/assets/c37468a4-ddda-444a-842d-44d13f4e2a81"
/> | <img width="357" height="162" alt="image"
src="https://github.com/user-attachments/assets/04359925-4e3e-4d55-b8cf-550a6c2ba6f8"
/> |

<!--
## Preview links

If relevant, include links to changed pages for easy review access.

Copy the preview base URL from the Vercel bot comment on this PR. Use
the following table as an example template.

| Site | Live | Preview | Search for |
| -------------- |
-------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------
| ----------------------------- |
| WWW | [/blog/your-post](https://supabase.com/blog/your-post) |
[/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post)
| unique phrase from the change |
| Docs |
[/docs/guides/your-page](https://supabase.com/docs/guides/your-page) |
[/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page)
| unique phrase from the change |
| Studio | [/dashboard](https://supabase.com/dashboard) |
[/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard)
| unique phrase from the change |
| Design system | [/design-system](https://supabase.com/design-system) |
[/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system)
| unique phrase from the change |
| UI library | [/library](https://supabase.com/library) |
[/library](https://ui-library-git-branch-name-supabase.vercel.app/library)
| unique phrase from the change |
| Knowledge base |
[/kb/guides/your-page](https://supabase.com/kb/guides/your-page) |
[/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page)
| unique phrase from the change |
-->

<!-- ## Additional context

Optionally add any other context or screenshots.

-->

## 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)
This commit is contained in:
Anthony Lio authored and GitHub committed 2026-11-05 09:03:38 +02:00
1 parent ebe8849f8b
commit e89e3cf0a4
1 file changed
+1 -1
@@ -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
)}
/>