From 09792c93cf1001b2b1de089a571ef0bf42996293 Mon Sep 17 00:00:00 2001 From: Jokin Date: Mon, 13 Jul 2026 14:19:46 +0200 Subject: [PATCH] Fix light-dark scroll bars --- ui/src/styles.css | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ui/src/styles.css b/ui/src/styles.css index a8e6d77..15fe33c 100644 --- a/ui/src/styles.css +++ b/ui/src/styles.css @@ -3,6 +3,8 @@ /* shadcn-style theme tokens (zinc placeholder palette — tweak freely). The app follows the OS light/dark preference automatically. */ :root { + /* Native UI (scrollbars, form controls) follows the OS unless a theme is forced. */ + color-scheme: light dark; --background: oklch(1 0 0); --foreground: oklch(0.141 0.005 285.823); --card: oklch(1 0 0); @@ -33,7 +35,12 @@ /* Dark tokens apply when the user forces dark, or follows a dark system theme. (data-theme is set by SettingsService; absent = follow the system.) */ +:root[data-theme='light'] { + color-scheme: light; +} + :root[data-theme='dark'] { + color-scheme: dark; --background: oklch(0.141 0.005 285.823); --foreground: oklch(0.985 0 0); --card: oklch(0.21 0.006 285.885); @@ -89,12 +96,6 @@ } } -@media (prefers-color-scheme: dark) { - :root[data-theme='light'] { - color-scheme: light; - } -} - @theme inline { --color-background: var(--background); --color-foreground: var(--foreground);