Skip to content

fix(dashboard): match native controls to the theme in Safari - #5432

Merged
Rui-V-Almeida merged 3 commits into
mainfrom
rui/safari-component-fix
Nov 20, 2026
Merged

Rui-V-Almeida merged 3 commits into
mainfrom
rui/safari-component-fix

Conversation

@Rui-V-Almeida

@Rui-V-Almeida Rui-V-Almeida commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Checklist

  • No breaking changes
  • Tests pass
  • New features have new tests
  • Documentation is updated (if applicable)
  • Title of the PR is in the correct format

🤖 Generated with nhost-code

Goal

Fix how dashboard components render in Safari. Safari draws native form parts (file input button, scrollbars, date pickers, autofill) using the page's declared color scheme. The dashboard never declared one, so in dark mode Safari kept light native controls and default dark text, which made parts of components look broken. The intended outcome is that native control parts match the active light or dark theme in Safari, with no visual change in other browsers.

Type: Bug fix

Changes

  • Declared color scheme per theme — :root now sets color-scheme: light and .dark sets color-scheme: dark inside the existing @layer base token blocks. Because the theme toggle already switches the dark class on html, the browser's native UI for inputs, scrollbars and pickers now follows the same theme as the design tokens.
  • File input button text color — the v3 Input adds file:text-foreground, so the ::file-selector-button text uses the foreground token instead of the browser default, which Safari rendered unreadable in dark mode.

Key files

  • dashboard/src/styles/globals.css (+2/-0) — color-scheme declarations for the light and dark token blocks.
  • dashboard/src/components/ui/v3/input.tsx (+1/-1) — foreground color for the file selector button.

@Rui-V-Almeida Rui-V-Almeida self-assigned this Nov 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Vercel Deployment Info - dashboard

@Rui-V-Almeida
Rui-V-Almeida merged commit eac3de4 into main Nov 20, 2026
11 checks passed
@Rui-V-Almeida
Rui-V-Almeida deleted the rui/safari-component-fix branch November 20, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants