mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
## Problem - popovers, menus, selects and the chart tooltip draw a 1px `border` next to a `shadow-*`, so the edge shows as a separate gray line ## Solution - adds `floating-surface-shadow-sm` and `-md` utilities in one file, so every floating surface uses the same edge and shadow - replaces popover, menu, select and chart tooltip borders and shadows with the `md` utility, so edges blend into shadows - changes the chart tooltip background to the card surface in dark mode, so the tooltip is lighter than the page - adds a 1px outline in forced colors mode, because that mode removes box shadows | before | after | | -------|------| | <img width="696" height="371" alt="image" src="https://github.com/user-attachments/assets/0bca48bd-565d-48e0-bd44-1e804e3ebd7b" /> | <img width="696" height="371" alt="image" src="https://github.com/user-attachments/assets/6ad2d80e-806a-46a6-b022-891b55d979e4" /> | <!-- ## 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 [/design-system/docs/components/popover](https://design-system-git-antlio-floating-surface-shadows-supabase.vercel.app/design-system/docs/components/popover) and click "Open popover" 2. make sure that the popover has a soft shadow and a thin edge with no separate gray border, in light and dark theme 3. open [/design-system/docs/components/dropdown-menu](https://design-system-git-antlio-floating-surface-shadows-supabase.vercel.app/design-system/docs/components/dropdown-menu), click "Open" and hover "Invite users", and make sure that the menu and the submenu have the same edge 4. open [/design-system/docs/components/select](https://design-system-git-antlio-floating-surface-shadows-supabase.vercel.app/design-system/docs/components/select), click "Select a fruit" and make sure that the list has the same edge 5. open [/design-system/docs/components/chart](https://design-system-git-antlio-floating-surface-shadows-supabase.vercel.app/design-system/docs/components/chart) in dark theme, hover a bar in the tooltip example, and make sure that the tooltip is lighter than the page 6. in chrome devtools, open the rendering panel and set "Emulate CSS media feature forced-colors" to `active`, and make sure that the popover and the select list have an outline 7. open [/design-system/docs/components/tooltip](https://design-system-git-antlio-floating-surface-shadows-supabase.vercel.app/design-system/docs/components/tooltip), hover "Hover" and make sure that the tooltip still has its shadow from #52631 ## 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)
44 lines
1.7 KiB
CSS
44 lines
1.7 KiB
CSS
@import 'tailwindcss';
|
|
|
|
/* JS plugins. Tailwind v4 supports `@plugin` for both v3-style JS plugins and
|
|
* v4-native packages. */
|
|
@plugin "@tailwindcss/typography";
|
|
@plugin "@tailwindcss/forms";
|
|
@import 'tw-animate-css';
|
|
|
|
/* Define the semantic system first, then override its core inputs per theme.
|
|
* This order is significant because :root and a single class selector have
|
|
* equal specificity. Radix/scale/brand --color-* values are inlined directly
|
|
* in colors.css below. */
|
|
@import '../ui/build/css/source/global.css';
|
|
@import '../ui/build/css/source/semantic.css';
|
|
@import '../ui/build/css/source/compat.css';
|
|
@import '../ui/build/css/themes/dark.css';
|
|
@import '../ui/build/css/themes/light.css';
|
|
|
|
/* Reset Tailwind's built-in color tokens before re-defining our own, so e.g.
|
|
* --color-amber-* doesn't ship a default Tailwind value alongside the Radix
|
|
* one. */
|
|
@import './unset-tw-colors.css';
|
|
|
|
/* Theme tokens + utilities + variants + base layer. colors.css declares the
|
|
* Radix/scale/brand --color-* CSS variables with per-theme values; theme.css
|
|
* consumes them from @theme inline so Tailwind generates the utilities. */
|
|
@import './css/colors.css';
|
|
@import './css/theme.css';
|
|
@import './css/charts.css';
|
|
@import './css/animations.css';
|
|
@import './css/utilities.css';
|
|
@import './css/shadows.css';
|
|
@import './tailwind-plugins/hit-area.css';
|
|
@import './css/variants.css';
|
|
@import './css/base.css';
|
|
|
|
/*
|
|
* Typography prose / prose-toc / prose-docs overrides live in a focused JS
|
|
* config because @tailwindcss/typography reads its theme.typography options
|
|
* from the JS config — not from CSS @theme tokens. See:
|
|
* https://github.com/tailwindlabs/tailwindcss-typography#customizing-the-css
|
|
*/
|
|
@config './typography.config.js';
|