From 5e3a9f9f42fc228c04a43fff180eff66f9964d54 Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 7 May 2026 10:04:30 +0100 Subject: [PATCH] fix(ui): promote modal overlay to token, lift modal above grain, dedupe FilesPage drop-zone - Add --color-overlay-dim token to app.css @theme (rgba(15,14,12,0.7) dark, rgba(26,24,22,0.55) light); mirror as --overlay-dim in design-system/colors_and_type.css. - MorningTriageModal: replace inlined rgba scrim with var(--color-overlay-dim), drop backdrop-blur-sm (brand opposes glassmorphism by default), bump container to z-[60] so it sits above the .grain z-50 overlay. - FilesPage: collapse two near-identical drop-zone blocks into one bordered region with conditional inner content; preserves isDragOver hover behaviour and aria region. --- src/app.css | 8 ++++ src/design-system/colors_and_type.css | 6 +++ src/lib/components/MorningTriageModal.svelte | 10 ++--- src/lib/pages/FilesPage.svelte | 42 +++++++------------- 4 files changed, 34 insertions(+), 32 deletions(-) diff --git a/src/app.css b/src/app.css index 45e9649..8a9ffdd 100644 --- a/src/app.css +++ b/src/app.css @@ -69,6 +69,10 @@ --color-danger: #e87171; --color-warning: #e8c86e; + /* Overlays — used by modal scrims. Derived from --color-bg #0f0e0c at + 0.7 alpha so the dim sits on the brand neutral, not pure black. */ + --color-overlay-dim: rgba(15, 14, 12, 0.7); + /* Layout */ --color-sidebar: #13120f; --color-nav-active: #201e1a; @@ -136,6 +140,10 @@ --color-sidebar: #f5f2ed; --color-nav-active: #eae6e0; --color-hover: #ede9e3; + + /* Warm dim for modal scrims in light theme. Lower alpha so the cream + surface still reads through softly. */ + --color-overlay-dim: rgba(26, 24, 22, 0.55); } :root[data-theme="light"] ::-webkit-scrollbar-thumb { diff --git a/src/design-system/colors_and_type.css b/src/design-system/colors_and_type.css index 5f50b8d..a801fe6 100644 --- a/src/design-system/colors_and_type.css +++ b/src/design-system/colors_and_type.css @@ -89,6 +89,9 @@ --danger: #e87171; --warning: #e8c86e; + /* — Overlays — modal scrim. Derived from --bg #0f0e0c at 0.7 alpha. — */ + --overlay-dim: rgba(15, 14, 12, 0.7); + /* — Radii — */ --radius-sm: 6px; --radius-md: 8px; @@ -177,6 +180,9 @@ --success: #2f7549; --danger: #a83838; --warning: #b89a3e; + + /* Warm dim for modal scrim in light theme. */ + --overlay-dim: rgba(26, 24, 22, 0.55); } /* ============================================================ diff --git a/src/lib/components/MorningTriageModal.svelte b/src/lib/components/MorningTriageModal.svelte index 2429284..18c9e0b 100644 --- a/src/lib/components/MorningTriageModal.svelte +++ b/src/lib/components/MorningTriageModal.svelte @@ -258,14 +258,14 @@ {#if open}