Skip to content

fix(ui): make dark mode coherent across cards, modals, inputs#264

Merged
iduartgomez merged 1 commit into
mainfrom
fix/dark-mode-theme
May 24, 2026
Merged

fix(ui): make dark mode coherent across cards, modals, inputs#264
iduartgomez merged 1 commit into
mainfrom
fix/dark-mode-theme

Conversation

@iduartgomez
Copy link
Copy Markdown
Contributor

Problem

Dark mode rendered incoherently: compose/new-message modals, Settings/Appearance cards, inputs, and popovers showed as white on the dark background. Theme tokens existed, but component CSS hardcoded #fff surfaces, rgba(255,255,255,X) hover films, and baked light-slate washes that never picked up the data-theme="dark" overrides.

before after
white compose modal, white settings cards on dark bg dark surfaces matching the palette

Fix

Tokenize the offending surfaces so the existing dark overrides in tokens.css apply. CSS-only — static vendor assets, no rebuild.

  • tokens.css: add --hover (surface hover film) and --amber-* banner tokens to the [data-theme="dark"] and system-dark override blocks.
  • Surface #fffvar(--bg-card): compose modal sheet; settings cards/modals/popovers/inputs/selects/textareas/key-card/tier/button backgrounds; sidebar active nav; message-list selected card; topbar search focus.
  • rgba(255,255,255,X) hover films → var(--hover): settings nav/back/btn-secondary, sidebar nav, message-card, detail buttons.
  • Baked light washes (rgba(241,245,249,X) / rgba(248,250,252,X)) → var(--c1)/var(--hover): settings bars/foots/side/sub-rows, topbar, compose foot.
  • Amber backup banner now resolves via var(--amber-ink/bg/border) → light amber on dark.

Left intentionally unchanged: white-on-color button text, toggle knob, trust ticks (correct on colored fills). Login (.fm-pre) is light-only by design and untouched.

Verification

Verified live via Playwright at dark theme — compose modal + settings cards/inputs render dark and readable; amber banner computes color: rgb(251,191,36) on rgba(217,119,6,0.12).

Scope

7 CSS files only. Branched off main, independent of the in-flight quarantine/contact-modal work.

Component CSS hardcoded #fff surfaces, rgba(255,255,255,X) hover films,
and baked light-slate washes that never respected data-theme="dark", so
compose/settings cards, modals, inputs, and popovers rendered white on
the dark background.

Tokenize the offending surfaces so the existing dark overrides apply:

- tokens.css: add --hover (surface hover film) and --amber-* banner
  tokens to the [data-theme="dark"] and system-dark override blocks.
- Surface #fff -> var(--bg-card): compose modal sheet, settings
  cards/modals/popovers/inputs/selects/textareas/key-card/tier/btn
  backgrounds, sidebar active nav, message-list selected card, topbar
  search focus.
- rgba(255,255,255,X) hover films -> var(--hover): settings nav/back/
  btn-secondary, sidebar nav, message-card, detail buttons.
- Baked light washes (rgba(241,245,249,X) / rgba(248,250,252,X)) ->
  var(--c1) or var(--hover): settings bars/foots/side/sub-rows, topbar,
  compose foot.
- Amber backup banner now resolves via var(--amber-ink/bg/border) ->
  light amber on dark.

White-on-color button text, toggle knob, and trust ticks left as-is.
Login (.fm-pre) is intentionally light-only and untouched.
@iduartgomez iduartgomez force-pushed the fix/dark-mode-theme branch from b3a8e15 to 74cf251 Compare May 24, 2026 07:39
@iduartgomez iduartgomez merged commit c9fc837 into main May 24, 2026
5 of 6 checks passed
@iduartgomez iduartgomez deleted the fix/dark-mode-theme branch May 24, 2026 07:53
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.

1 participant