fix(#94): replace text-white with text-primary-fg on all primary buttons #109

Merged
marcel merged 1 commits from feature/94-fix-dark-save-button into main 2026-03-27 16:07:40 +01:00
Owner

Closes #94

Problem

In dark mode --c-primary switches from navy #012851 to mint #a1dcd8. Buttons using bg-primary text-white showed white text on mint at ~1.4:1 — invisible. Buttons using bg-brand-navy text-white were also invisible: navy (#012851) on the dark canvas (#0d0d0d) at 1.3:1.

Fix

28 components updated:

  • bg-primary ... text-whitetext-primary-fg
  • hover:bg-primary hover:text-whitehover:bg-primary hover:text-primary-fg
  • bg-brand-navy ... text-white ... hover:bg-brand-navy/90bg-primary ... text-primary-fg ... hover:bg-primary/90 (4 enrich/new files)

Light mode unchanged: primary-fg = white in light mode, so no visual difference.
Dark mode: primary-fg = navy (#012851) on mint button = readable.

Test plan

  • Dark mode: save button in document edit form is visually distinct (mint background, navy text)
  • Dark mode: save button in new document form is visible
  • Dark mode: admin action buttons, login button, comment submit button all visible
  • Dark mode: user avatar circles (initials) have readable text
  • Light mode: no visual change to any button — primary-fg = white in light mode
  • Both modes: delete/cancel buttons (red/gray) unaffected — only bg-primary targets changed
Closes #94 ## Problem In dark mode `--c-primary` switches from navy `#012851` to mint `#a1dcd8`. Buttons using `bg-primary text-white` showed **white text on mint at ~1.4:1** — invisible. Buttons using `bg-brand-navy text-white` were also invisible: navy (`#012851`) on the dark canvas (`#0d0d0d`) at **1.3:1**. ## Fix 28 components updated: - `bg-primary ... text-white` → `text-primary-fg` - `hover:bg-primary hover:text-white` → `hover:bg-primary hover:text-primary-fg` - `bg-brand-navy ... text-white ... hover:bg-brand-navy/90` → `bg-primary ... text-primary-fg ... hover:bg-primary/90` (4 enrich/new files) **Light mode unchanged**: `primary-fg = white` in light mode, so no visual difference. **Dark mode**: `primary-fg = navy (#012851)` on mint button = readable. ## Test plan - [ ] Dark mode: save button in document edit form is visually distinct (mint background, navy text) - [ ] Dark mode: save button in new document form is visible - [ ] Dark mode: admin action buttons, login button, comment submit button all visible - [ ] Dark mode: user avatar circles (initials) have readable text - [ ] Light mode: no visual change to any button — primary-fg = white in light mode - [ ] Both modes: delete/cancel buttons (red/gray) unaffected — only bg-primary targets changed
marcel added 1 commit 2026-03-27 16:00:48 +01:00
fix(#94): replace text-white with text-primary-fg on all primary buttons
Some checks failed
CI / Unit & Component Tests (push) Successful in 2m35s
CI / Backend Unit Tests (push) Successful in 2m14s
CI / E2E Tests (push) Failing after 29m28s
CI / Unit & Component Tests (pull_request) Successful in 2m24s
CI / Backend Unit Tests (pull_request) Successful in 2m9s
CI / E2E Tests (pull_request) Failing after 28m13s
e3a2027425
In dark mode --c-primary switches from navy (#012851) to mint (#a1dcd8).
Buttons using bg-primary+text-white showed white text on mint at 1.4:1
contrast — invisible. bg-brand-navy buttons were also invisible (navy on
near-black canvas, 1.3:1).

Replaced in 28 components app-wide:
- bg-primary ... text-white → text-primary-fg
- hover:bg-primary hover:text-white → hover:text-primary-fg
- bg-brand-navy ... text-white + hover:bg-brand-navy/90 →
  bg-primary ... text-primary-fg + hover:bg-primary/90

Light mode is unchanged: primary-fg = white in light mode.
Dark mode: primary-fg = navy (#012851) on mint bg = readable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marcel merged commit fcff7fbdb1 into main 2026-03-27 16:07:40 +01:00
marcel deleted branch feature/94-fix-dark-save-button 2026-03-27 16:07:54 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#109