Commit Graph

23 Commits

Author SHA1 Message Date
Danny White
5f9ce727c0 fix(ui): systematise control surface fills and hover borders (#48887)
## What kind of change does this PR introduce?

Bug fix / design-system token hygiene for form and selector chrome.

## What is the current behavior?

After opaque default-button fills, text fields, selects, and selector
tiles drifted apart: inputs and selects mixed ad-hoc washes, hover
borders bounced between `border-stronger` / `border-foreground-muted`,
invalid fields had no hover step, and composites like InputGroup leaked
inner hover borders.

Follow-up to #48837 (opaque button fills) where Select rest still felt
darker than Input on forms such as scoped access tokens.

## What is the new behavior?

Named control roles and one interactive border:

| Role | Fill | Rest border | Hover / focus / open |
| --- | --- | --- | --- |
| Field (sunk) | `bg-field` | `border-control` | `border-control-hover`
|
| Raised control | `bg-control-raised` | `border-strong` |
`border-control-hover` |
| Overlaying action | card → popover | `border-strong` |
`border-control-hover` |
| Invalid field | `bg-destructive-200` | `border-destructive-400` |
`border-destructive` |

- `--field` / `--control-raised` / `--border-control-hover` live in
`semantic.css` (source of truth for roles; README points there)
- Input / Textarea / InputGroup / legacy TextArea use the field ladder
(incl. invalid hover)
- Select and empty MultiSelect use raised; filled MultiSelect sinks to
field
- Default + dashed Button, CommandMenu trigger, and radio
card/stacked/large use `border-control-hover`
- Studio selector tiles aligned: Connect mode, role impersonation,
DuckLake modes, compute “Contact us”

| Before and After |
| --- |
| <img width="1576" height="759" alt="Access Tokens Account Supabase"
src="https://github.com/user-attachments/assets/4bbe8b2b-a31a-4d63-80ba-04a1a8a5609d"
/> |
| <img width="1576" height="759" alt="Access Tokens Account Supabase"
src="https://github.com/user-attachments/assets/92271223-4103-4cc6-a7c0-9e4ff71cce30"
/> |

## Additional context

`--control-raised` aliases `--card` today (role name so fill can diverge
later). Rest `border-control` / `border-strong` both still map to
`--input` via compat; the shared interactive step is
`--border-control-hover`.

## To test

1. **[Account → Access
Tokens](https://studio-staging-git-dnywh-fixcontrol-surface-tokens-supabase.vercel.app/dashboard/account/tokens)**
Open Generate / New scoped token. Side-by-side Input, Select,
RadioGroupStacked, MultiSelect. Confirm sunk vs raised fills, shared
hover border, MultiSelect flips to sunk once a value is selected. Leave
a required field empty to check invalid rest → hover → focus.

2. **[Org →
Projects](https://studio-staging-git-dnywh-fixcontrol-surface-tokens-supabase.vercel.app/dashboard/org/_)**
Hover the dashed Status filter. Hover default / filled filter buttons
when active. Confirm hover/open borders match.

3. **[Project →
Connect](https://studio-staging-git-dnywh-fixcontrol-surface-tokens-supabase.vercel.app/dashboard/project/_)**
Open Connect from the header. Mode grid tiles: hover + selected borders
match radio cards (no old muted-foreground ring).

4. **[Project →
Compute](https://studio-staging-git-dnywh-fixcontrol-surface-tokens-supabase.vercel.app/dashboard/project/_/settings/infrastructure)**
(optional)
   Compute size radios + “Contact us” tile hover.
2026-08-18 16:54:25 +10:00
Saxon Fletcher
ec24d69369 Browser compatibility for colours (#47801)
Replaces abs and from for foreground colours to potentially improve
browser compatibility

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Style**
* Improved semantic color calculations for broader browser
compatibility.
* Refined foreground, muted, and tertiary text colors for more
consistent theme rendering.
  * Improved surface overlay contrast across different tones.
* Fine-tuned the light theme’s link color brightness for better visual
balance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-08-06 14:38:42 +10:00
Danny White
3d07613c2b fix(ui): restore text-contrast token (#48017)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Bug fix

## What is the current behavior?

`text-contrast` / `text-foreground-contrast` resolve to
`--primary-foreground`, which is always the darker of surface /
foreground lightness (text for the green primary fill).

In light mode that is near-black, so contrast text on inverted fills is
wrong: on true black (`bg-black`) it disappears; on dark fills like
`bg-red-900` it shows as a black icon instead of white. Visible
regression on the design-system colour usage page: the `text-contrast`
swatch only shows "Postgres" on hover.

Regression from the colour system rewrite (#47288), which aliased
`--foreground-contrast` → `--primary-foreground`.

## What is the new behavior?

`--foreground-contrast` is defined again as a surface-based inverse of
`--foreground` (light in light mode, dark in dark mode). Tailwind
utilities `text-contrast` and `text-foreground-contrast` map to it.

`--primary-foreground` is unchanged and still used for text on the
primary fill.

## Additional context

### Callsites to test (light mode especially)

| Where to look | What to check |
|---|---|
| [Design system → Colour
usage](https://design-system-git-fix-text-contrast-token-supabase.vercel.app/design-system/docs/color-usage)
| Under **Text**, the `text-contrast` swatch shows "Postgres" without
hovering |
| [Studio staging → Auth
Users](https://studio-staging-git-fix-text-contrast-token-supabase.vercel.app/project/_/auth/users)
→ open any user | Boolean fields (e.g. confirmed): check/X on the black
circle should be **white** (not missing) |
| [Studio staging → Support
new](https://studio-staging-git-fix-text-contrast-token-supabase.vercel.app/support/new)
→ upload a file | Red remove (`X`) badge should be a **white** X (prod
currently shows black) |
| [www →
Contribute](https://zone-www-dot-com-git-fix-text-contrast-token-supabase.vercel.app/contribute)
→ apply at least one filter | Filter count badge: **white** number on
black |
| [Studio staging → Support
link](https://studio-staging-git-fix-text-contrast-token-supabase.vercel.app/support/link)
success state (after linking a ticket) | Check on the brand badge should
use contrast text (light on brand in light mode) |

`Announcement` (`text-foreground-contrast` dismiss icon) is not
currently mounted in any app — covered by the design-system / token
check above.
2026-07-20 10:59:34 -04:00
Saxon Fletcher
fb02182e86 Color system (#47288)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES/NO

## What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

## What is the current behavior?

Please link any relevant issues here.

## What is the new behavior?

Feel free to include screenshots if it includes visual changes.

## Additional context

Add any other context or screenshots.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Refreshed theming across the UI to use modern color expressions and
shared theme variables (including OKLCH-based gradients), improving
consistency for charts, code blocks, overlays, icons, and decorative
backgrounds.
* **Bug Fixes**
* Improved light/dark color and gradient consistency across axis/grid
styling, reference lines, buttons/badges, sidebar accents, loaders, and
other visual components.
* **Documentation**
* Updated styling/theming guidance to align with the revised semantic
token system and the updated theme variable usage patterns.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 15:00:43 +10:00
Francesco Sansalvadore
263730a8b8 chore: uniform card and panel padding-x (#41237) 2025-12-11 09:18:21 +00:00
Jonathan Summers-Muir
0acd2afa80 add surface-75 for dark (#26734) 2024-05-24 14:33:25 +08:00
Jonathan Summers-Muir
171714965e Feat/design tokens upgrade (#18051)
* new packages

* new transforms

* Update package.json

* new internal files

* Update cleanse-css-for-tailwind.js

* updated css files

* remove old code

* update tokens

* Delete global.css

* update themes

* Update tailwind-theming.md

* Update tailwind-theming.md

* Update tailwind-theming.md

* Update tailwind-theming.md

* Update tailwind-theming.md

* Update tailwind-theming.md

---------

Co-authored-by: Francesco Sansalvadore <f.sansalvadore@gmail.com>
2023-10-23 03:28:22 +00:00
Jonathan Summers-Muir
358ff034d9 Merge branch 'master' into feat/branch-management-2--with-project-settings 2023-08-10 11:54:45 +08:00
Jonathan Summers-Muir
c37ea37e81 Merge branch 'master' into feat/branch-management-2--with-project-settings 2023-08-02 12:50:34 +08:00
Jonathan Summers-Muir
11cd7e684d started moving all the integration UI stuff around 2023-08-02 05:48:21 +08:00
Jonathan Summers-Muir
f875f6747a Merge branch 'chore/update-brand-colors' into feat/ai-sql-editor-styling--with-new-brand-tailwind-tokens 2023-07-30 21:52:22 +08:00
Jonathan Summers-Muir
8292e54447 chore: more AiIcon changes. moved all styling to CSS module 2023-07-30 21:00:52 +08:00
Jonathan Summers-Muir
a823512bb5 chore: update colors from figma variables 2023-07-30 17:05:36 +08:00
Jonathan Summers-Muir
a08084c839 started migrating components to shadcn. also experimented with loading icon 2023-07-29 21:21:48 +08:00
Jonathan Summers-Muir
561008bdb7 fix: colors. new destructive and warning colors 2023-07-18 00:05:50 +08:00
Jonathan Summers-Muir
276bb1ffd3 update config and colors from figma 2023-07-13 12:45:15 +08:00
Jonathan Summers-Muir
d473bf0e80 more color 2023-07-06 01:55:36 +08:00
Jonathan Summers-Muir
3b9f8ccbf5 update colors 2023-07-06 01:35:46 +08:00
Jonathan Summers-Muir
1214557d32 add new CSS 2023-07-05 00:52:38 +08:00
Jonathan Summers-Muir
fe74f5656a fix tokens 2023-06-28 12:09:23 +08:00
Jonathan Summers-Muir
f88eae1706 update styles 2023-06-26 11:52:26 +08:00
Jonathan Summers-Muir
c97802294a updated build CI for tokens for global.json support 2023-06-24 02:45:57 +08:00
Jonathan Summers-Muir
0c72f255fa chore: update to support new theme 2023-06-23 22:11:07 +08:00