From 9c3f924f275462f97e643cd2665d37f1177c3b16 Mon Sep 17 00:00:00 2001 From: Shaun Arman Date: Sun, 29 Mar 2026 21:14:28 -0500 Subject: [PATCH] fix: prevent WebKit/GTK system theme from overriding input text colors on Linux On Linux, WebKit inherits GTK system text colors for form controls, causing dark-on-dark text in dark mode. Explicitly set color and -webkit-text-fill-color on inputs/textareas/buttons, and add color-scheme: dark to .dark so WebKit uses the correct system UI color scheme. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- src/styles/globals.css | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/styles/globals.css b/src/styles/globals.css index 9bf7cd6d..1cb5c438 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -51,4 +51,21 @@ @layer base { * { @apply border-border; } body { @apply bg-background text-foreground; } + + /* Prevent WebKit/GTK from overriding form control colors with system theme */ + input, textarea, select, button { + color: hsl(var(--foreground)); + background-color: hsl(var(--background)); + -webkit-text-fill-color: hsl(var(--foreground)); + } + + input::placeholder, textarea::placeholder { + color: hsl(var(--muted-foreground)); + -webkit-text-fill-color: hsl(var(--muted-foreground)); + opacity: 1; + } } + +/* Tell WebKit which color scheme is active so system UI elements match */ +:root { color-scheme: light; } +.dark { color-scheme: dark; }