From c5a76d726c874d9370f0a68171b95b4dd329a267 Mon Sep 17 00:00:00 2001 From: Till JS Date: Tue, 21 Apr 2026 15:20:48 +0200 Subject: [PATCH] fix(spaces): SpaceCreateDialog now reads in dark mode + cards all visible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two visible bugs on the Neuer-Space dialog in dark mode: 1. Type cards were invisible except for the active one. The CSS used `var(--color-border, hsl(0 0% 88%))` — a CSS variable without HSL wrapping. The theme system actually uses shadcn-style raw values (e.g. `--color-border: 0 0% 88%`) that need to be wrapped with `hsl(...)` at use-site. Without the wrap the border was undefined, and the card fell back to "no border and no background" = loose text on the dialog. 2. Input fields (Name, URL-Kürzel, Brand-Voice) rendered with a hard-coded white fallback because `var(--color-surface-1, white)` ignored the theme token in dark mode. Same wrapping issue as #1. Rewrote the dialog stylesheet to use the `hsl(var(--color-X))` pattern consistently — mirroring @mana/shared-ui Pill.svelte, which does work in both modes. Adjacent polish: - Every type card now has border + subtle background in all states; hover lifts it; active uses color-mix with --pill-primary-color so it picks up the current theme variant's accent. - Input fields use --color-input (shadcn standard) with --color-background fallback, with a primary-tinted focus ring. - Section labels (legend, field > span) styled as small uppercase labels matching other form conventions. - Backdrop is a bit darker and gets an extra alpha bump in dark mode. - Error panel uses color-mix so it blends into dark mode instead of showing a bright light-red panel. - Buttons use --color-primary with --color-primary-foreground for the text, with a small brightness filter on hover. Plan: docs/plans/spaces-foundation.md Co-Authored-By: Claude Opus 4.7 (1M context) --- .../layout/SpaceCreateDialog.svelte | 149 +++++++++++++----- 1 file changed, 106 insertions(+), 43 deletions(-) diff --git a/apps/mana/apps/web/src/lib/components/layout/SpaceCreateDialog.svelte b/apps/mana/apps/web/src/lib/components/layout/SpaceCreateDialog.svelte index 5484da169..363c10a37 100644 --- a/apps/mana/apps/web/src/lib/components/layout/SpaceCreateDialog.svelte +++ b/apps/mana/apps/web/src/lib/components/layout/SpaceCreateDialog.svelte @@ -215,16 +215,24 @@ {/if}