From 13262b5cecd5e2ea1c08f9d1558f670e08c626ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hartmut=20N=C3=B6renberg?= Date: Thu, 9 Apr 2026 22:25:10 +0200 Subject: [PATCH] =?UTF-8?q?refactor(ui):=20unify=20dark=20theme=20?= =?UTF-8?q?=E2=80=94=20replace=20hardcoded=20hex=20with=20CSS=20variables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace sidebar #0d0e22 hardcoded hex with .sidebar-panel class backed by --surface-card CSS variable so all three sidebar elements (desktop, mobile, mobile header) share the same neutral-dark color as the main content - Remove purple logo gradient (dark:from-[#0d0e22] dark:to-[#13162a]) — now uses --surface-elevated for a neutral, unified look - Add .dark slate-*/gray-900 overrides: bg-slate-700/800/900, border-slate-800, hover:bg-slate-800 all map to --surface-elevated/--surface-card/--border-subtle - Remove dead hardcoded rgb(45 51 71) rule for dark bg-gray-100 (was overridden further down anyway; now consistently uses --surface-elevated) Co-Authored-By: Claude Sonnet 4.6 --- apps/web/src/app/globals.css | 26 ++++++++++++++++++++- apps/web/src/components/layout/AppShell.tsx | 8 +++---- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/apps/web/src/app/globals.css b/apps/web/src/app/globals.css index fdb8437..7ae66eb 100644 --- a/apps/web/src/app/globals.css +++ b/apps/web/src/app/globals.css @@ -217,7 +217,7 @@ } .dark .bg-gray-100 { - background-color: rgb(45 51 71) !important; + background-color: rgb(var(--surface-elevated)) !important; } .dark .border-gray-100 { @@ -345,6 +345,30 @@ color: rgb(196 181 253) !important; } +/* Slate-* normalization — map to CSS variable surfaces */ +.dark .bg-slate-700, +.dark .bg-slate-800 { + background-color: rgb(var(--surface-elevated)) !important; +} +.dark .bg-slate-900, +.dark .bg-gray-900 { + background-color: rgb(var(--surface-card)) !important; +} +.dark .border-slate-800, +.dark .border-slate-700 { + border-color: rgb(var(--border-subtle)) !important; +} +.dark .hover\:bg-slate-800:hover { + background-color: rgb(var(--surface-elevated)) !important; +} + +/* Sidebar panel — overrides the hardcoded hex values in AppShell */ +:is(.dark) .sidebar-panel { + background-color: rgb(var(--surface-card) / 0.92) !important; + border-right-color: rgb(var(--border-subtle)) !important; + border-bottom-color: rgb(var(--border-subtle)) !important; +} + /* Modal / overlay */ .dark .shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.6) !important; diff --git a/apps/web/src/components/layout/AppShell.tsx b/apps/web/src/components/layout/AppShell.tsx index 31ae73a..312e80f 100644 --- a/apps/web/src/components/layout/AppShell.tsx +++ b/apps/web/src/components/layout/AppShell.tsx @@ -426,7 +426,7 @@ function SidebarContent({ sidebarCollapsed ? "px-3 py-4" : "px-6 py-6", )}>
@@ -741,7 +741,7 @@ function DesktopSidebar({ return (