refactor(ui): unify dark theme — replace hardcoded hex with CSS variables
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -426,7 +426,7 @@ function SidebarContent({
|
||||
sidebarCollapsed ? "px-3 py-4" : "px-6 py-6",
|
||||
)}>
|
||||
<div className={clsx(
|
||||
"inline-flex items-center rounded-2xl border border-brand-200/70 bg-gradient-to-br from-white to-brand-50 shadow-sm dark:border-brand-900/40 dark:from-[#0d0e22] dark:to-[#13162a]",
|
||||
"inline-flex items-center rounded-2xl border border-brand-200/70 bg-gradient-to-br from-white to-brand-50 shadow-sm dark:border-white/[0.08] dark:from-[rgb(var(--surface-elevated))] dark:to-[rgb(var(--surface-elevated))]",
|
||||
sidebarCollapsed ? "p-2" : "gap-3 px-4 py-3",
|
||||
)}>
|
||||
<div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl bg-brand-600 text-white shadow-lg shadow-brand-600/25">
|
||||
@@ -741,7 +741,7 @@ function DesktopSidebar({
|
||||
return (
|
||||
<nav
|
||||
className={clsx(
|
||||
"hidden shrink-0 border-r border-gray-200/60 bg-white/95 shadow-[1px_0_12px_rgba(0,0,0,0.03)] backdrop-blur-xl backdrop-saturate-150 dark:border-white/[0.06] dark:bg-[#0d0e22]/90 dark:shadow-none lg:flex lg:flex-col",
|
||||
"sidebar-panel hidden shrink-0 border-r border-gray-200/60 bg-white/95 shadow-[1px_0_12px_rgba(0,0,0,0.03)] backdrop-blur-xl backdrop-saturate-150 dark:shadow-none lg:flex lg:flex-col",
|
||||
"transition-[width] duration-200 ease-out overflow-hidden",
|
||||
sidebarCollapsed ? "w-[72px]" : "w-72",
|
||||
)}
|
||||
@@ -793,7 +793,7 @@ function MobileSidebar({
|
||||
animate={{ x: 0 }}
|
||||
exit={{ x: -288 }}
|
||||
transition={{ type: "spring", stiffness: 400, damping: 35 }}
|
||||
className="fixed inset-y-0 left-0 z-50 flex w-72 flex-col border-r border-gray-200/60 bg-white/95 shadow-2xl backdrop-blur-2xl backdrop-saturate-150 dark:border-white/[0.06] dark:bg-[#0d0e22]/95 lg:hidden"
|
||||
className="sidebar-panel fixed inset-y-0 left-0 z-50 flex w-72 flex-col border-r border-gray-200/60 bg-white/95 shadow-2xl backdrop-blur-2xl backdrop-saturate-150 lg:hidden"
|
||||
>
|
||||
{/* Close button */}
|
||||
<button
|
||||
@@ -897,7 +897,7 @@ export function AppShell({ children, userRole = "USER" }: { children: React.Reac
|
||||
{/* Main content area */}
|
||||
<main ref={contentRef} className="flex-1 overflow-auto bg-transparent">
|
||||
{/* Mobile hamburger */}
|
||||
<div className="sticky top-0 z-20 flex items-center border-b border-gray-200/60 bg-white/85 px-4 py-2 backdrop-blur-xl dark:border-white/[0.06] dark:bg-[#0d0e22]/82 lg:hidden">
|
||||
<div className="sidebar-panel sticky top-0 z-20 flex items-center border-b border-gray-200/60 bg-white/85 px-4 py-2 backdrop-blur-xl lg:hidden">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setMobileOpen(true)}
|
||||
|
||||
Reference in New Issue
Block a user