fix: keep autofilled form fields readable in the dark theme #3
Loading…
Reference in a new issue
No description provided.
Delete branch "jtk/dark-mode-inputs"
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?
Fixes GitHub #3 (old mirror): in the dark theme, a filled-in email on the registration page was unreadable when the browser or a password manager (1Password) autofilled it.
Cause
Autofill paints its own light background behind the field but keeps our text color, which in the dark theme is near-white. Typing by hand looks fine (checked computed styles in dark and light: base-content on base-100).
What changed
app.css: autofilledinput/textarea/selectkeep the theme's colors (text fill + an inset shadow over the autofill background). Split into:autofilland:-webkit-autofillrules, since a browser drops a whole rule over a selector it doesn't know.text-gray-600; nowtext-base-content/70.Testing
CSS only; checked the rules land in the built
app.css.mix precommit: 148 passed. Autofill can't be triggered from a headless browser, so worth a quick look with 1Password on a real device.Note: other pages still use fixed light colors (
bg-white,text-gray-*, ~95 spots in admin users, import/export, user settings) that don't follow the dark theme. That's outside this fix; flagged separately.Review from Nye (approved) — Autofill rules split correctly (standard + -webkit-), use theme vars so they follow light and dark; registration hint text moved off text-gray-600. Needs a manual check in a real browser with 1Password/Chrome autofill after deploy; not blocking.