Dark mode: lime-green chip background gives zero contrast with white font (Berufung-durch + likely other selectors) #123
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
m's report (2026-05-26 09:34)
Scope
The selected-chip state uses lime-green (
#c6f41cper project CLAUDE.md brand) as background, with white font in dark mode → near-zero contrast (lime is high-luminance). m wants the chip's active-state text colour adjusted for dark mode so the label is readable.Likely affected:
Berufung durch …) — m's exact report.agenda-chip-activeor similar — date-range picker, deadline-status, etc.*-chip-active/*-activebackground-lime classWhat to do
frontend/src/styles/global.cssfor#c6f41cor--accent-limeor.*-activerules that set lime background.#0a0a0aorvar(--bg)) regardless of light/dark theme. The lime accent is high-luminance — it always needs dark text on top.Files most likely touched
frontend/src/styles/global.css— chip + active-state colour rules:root/[data-theme="dark"]blockHard rules
go build ./... && go test ./internal/... && cd frontend && bun run buildclean.mai/<worker>/darkmode-chip-contrast.Out of scope
Reporting
mai report completedwith branch + SHAs + screenshots-or-equivalent description: open Verfahrensablauf in dark mode → pick an appellant → confirm the active chip text is readable.Fixed in
18d2e74on branchmai/hermes/gitster-dark-mode-fix.Root cause
Six CSS rules paired a lime background (
var(--color-accent)) withcolor: var(--color-text)(orvar(--color-text, #…)fallbacks).--color-textis midnight in light mode but flips to cream in dark mode — so the active chip rendered cream-on-lime, near-zero contrast.The design already declares a token for this:
--color-accent-darkis defined to stay midnight in both themes precisely because it's the WCAG-AA foreground for the lime brand colour (see:rootline 44 +:root[data-theme="dark"]line 172 infrontend/src/styles/global.css). All correctly-contrasting active states in the codebase already use it (.agenda-chip-active,.proceeding-btn.active,.filter-pill.active,.streitwert-presets button.active, the.filter-bar-segmentchip, …).Fixes
All switched to
color: var(--color-accent-dark):.event-card-choices-option--active.fristen-row.is-active .fristen-row-num.form-hint-badge.paliadin-widget-send-btn.smart-timeline-anchor-submit.admin-rules-chip.activeThe
.event-card-choices-option--activerule is the one m saw — the popover that fires from the per-event "Berufung durch …" caret on Verfahrensablauf cards (choices.appellant.{title,claimant,defendant,both,none}ini18n.ts).Audit
Full audit script over
global.cssconfirmed:--color-accent-dark, an explicit dark hex (#000,#1c1917), or apply to text-less elements (::before/::aftermarkers, dots, progress fills).rgb(var(--hlc-lime-rgb) / 0.06–0.18)etc.) are unaffected — the lime tint never lifts the underlying surface to a contrast hazard.#BFF355) and non-active states untouched per scope.Verification
Built the frontend, then loaded the compiled
global.cssinto a standalone harness with all six selectors rendered side-by-side, in bothdata-theme="dark"anddata-theme="light":Builds:
go build ./...✅go test ./internal/...✅cd frontend && bun run build✅cd frontend && bun test✅ (169 pass)Commit
18d2e74—fix(styles): dark-mode contrast on lime-active chips (t-paliad-291)