From e0b6120cd32b781e981b2e1e68769490fcb3bbc4 Mon Sep 17 00:00:00 2001 From: Dmytro Stanchiev Date: Tue, 21 Apr 2026 21:43:11 -0400 Subject: [PATCH] refactor(theme): make light mode the default shell --- DESIGN.md | 28 +++++++-- src/app/globals.css | 81 ++++++++++++--------------- src/app/layout.tsx | 5 +- src/app/manifest.ts | 2 +- tests/legacy-design-migration.test.ts | 3 + 5 files changed, 66 insertions(+), 53 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index c0c9d6b..5217034 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -24,18 +24,21 @@ The approved product direction is an `event-first product console with co-equal ## 1. Visual Theme & Atmosphere -Vercel's website is the visual thesis of developer infrastructure made invisible — a design system so restrained it borders on philosophical. For `local-cal`, that same restraint should be applied to a dense, working interface rather than a marketing narrative. The app should be overwhelmingly white (`#ffffff`) with near-black (`#171717`) text in light mode, creating a precise product-console feel where every element earns its pixel. This isn't minimalism as decoration; it's minimalism as engineering principle. +Vercel's website is the visual thesis of developer infrastructure made invisible — a design system so restrained it borders on philosophical. For `local-cal`, that same restraint should be applied to a dense, working interface rather than a marketing narrative. The app should be overwhelmingly white (`#ffffff`) with near-black (`#171717`) text in light mode, creating a precise product-console feel where every element earns its pixel. Light mode is the default and canonical expression of the system. This isn't minimalism as decoration; it's minimalism as engineering principle. The custom Geist font family is the crown jewel. Geist Sans uses aggressive negative letter-spacing (-2.4px to -2.88px at display sizes), creating headlines that feel compressed, urgent, and engineered — like code that's been minified for production. At body sizes, the tracking relaxes but the geometric precision persists. Geist Mono completes the system as the monospace companion for code, terminal output, and technical labels. Both fonts enable OpenType `"liga"` (ligatures) globally, adding a layer of typographic sophistication that rewards close reading. What distinguishes Vercel from other monochrome design systems is its shadow-as-border philosophy. Instead of traditional CSS borders, Vercel uses `box-shadow: 0px 0px 0px 1px rgba(0,0,0,0.08)` — a zero-offset, zero-blur, 1px-spread shadow that creates a border-like line without the box model implications. This technique allows borders to exist in the shadow layer, enabling smoother transitions, rounded corners without clipping, and a subtler visual weight than traditional borders. The entire depth system is built on layered, multi-value shadow stacks where each layer serves a specific purpose: one for the border, one for soft elevation, one for ambient depth. +Dark mode is not a separate aesthetic direction and not a generic charcoal inversion. It is a token-level adaptation of the same product-console system: the same hierarchy, the same spacing, the same shadow architecture, and the same restraint. Dark surfaces should remain distinct from the page through whisper-light white border shadows, low-contrast interior glow, and controlled neutral separation rather than black cutouts or heavy elevation. + **Key Characteristics:** - Geist Sans with extreme negative letter-spacing (-2.4px to -2.88px at display) — text as compressed infrastructure - Geist Mono for code and technical labels with OpenType `"liga"` globally - Shadow-as-border technique: `box-shadow 0px 0px 0px 1px` replaces traditional borders throughout - Multi-layer shadow stacks for nuanced depth (border + elevation + ambient in single declarations) - Near-pure white canvas with `#171717` text — not quite black, creating micro-contrast softness +- Light mode is the default product presentation; dark mode is a faithful adaptation, not a re-theme - Functional accent colors used only for real event state and utilities, never decorative workflow chrome - Focus ring system using `hsla(212, 100%, 48%, 1)` — a saturated blue for accessibility - Pill badges (9999px) with tinted backgrounds for status indicators @@ -47,6 +50,13 @@ What distinguishes Vercel from other monochrome design systems is its shadow-as- - **Pure White** (`#ffffff`): Page background, card surfaces, button text on dark. - **True Black** (`#000000`): Secondary use, `--geist-console-text-color-default`, used in specific console/code contexts. +### Dark Theme Neutrals +- **Dark Canvas** (`#121212`): Dark page background. Use for the app shell only, never as a default theme. +- **Dark Surface** (`#181818`): Primary dark cards, dialogs, menus, and nav surfaces. +- **Dark Secondary Surface** (`#1d1d1d`): Inputs, action bars, and quieter tool surfaces in dark mode. +- **Dark Subtle Surface** (`#202020`): Hover, active, and accent-neutral dark states. +- **Dark Muted Text** (`#a3a3a3`): Secondary copy in dark mode. + ### Functional Accent Colors - **Action Blue** (`#0a72ef`): Use for active utility cues, attachment affordances, and recurrence emphasis when blue is semantically useful. - **Signal Pink** (`#de1d8d`): Use sparingly for metadata emphasis such as link state or secondary scan cues when pink improves hierarchy. @@ -81,6 +91,8 @@ What distinguishes Vercel from other monochrome design systems is its shadow-as- - **Subtle Elevation** (`rgba(0, 0, 0, 0.04) 0px 2px 2px`): Minimal lift for cards. - **Card Stack** (`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px, rgba(0,0,0,0.04) 0px 8px 8px -8px, #fafafa 0px 0px 0px 1px`): Full multi-layer card shadow. - **Ring Border** (`rgb(235, 235, 235) 0px 0px 0px 1px`): Light gray ring-border for tabs and images. +- **Dark Border Shadow** (`rgba(255, 255, 255, 0.08) 0px 0px 0px 1px`): Dark-mode border layer. Use this instead of reusing the light border shadow on dark surfaces. +- **Dark Card Stack** (`rgba(255,255,255,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.20) 0px 2px 2px, rgba(0,0,0,0.28) 0px 8px 8px -8px, rgba(255,255,255,0.03) 0px 0px 0px 1px`): Dark-mode equivalent of the light card stack. ## 3. Typography Rules @@ -165,6 +177,7 @@ What distinguishes Vercel from other monochrome design systems is its shadow-as- - Focus shadow: `1px 0 0 0 var(--ds-gray-alpha-600)` - Focus outline: `2px solid var(--ds-focus-color)` — consistent blue focus ring - Border: via shadow technique, not traditional border +- In dark mode, inputs and textareas sit on a quieter secondary surface rather than appearing as black voids carved out of the card ### Navigation - Clean horizontal nav on white, sticky @@ -244,11 +257,13 @@ What distinguishes Vercel from other monochrome design systems is its shadow-as- | Flat (Level 0) | No shadow | Page background, text blocks | | Ring (Level 1) | `rgba(0,0,0,0.08) 0px 0px 0px 1px` | Shadow-as-border for most elements | | Light Ring (Level 1b) | `rgb(235,235,235) 0px 0px 0px 1px` | Lighter ring for tabs, images | +| Dark Ring (Level 1c) | `rgba(255,255,255,0.08) 0px 0px 0px 1px` | Shadow-as-border for dark surfaces | | Subtle Card (Level 2) | Ring + `rgba(0,0,0,0.04) 0px 2px 2px` | Standard cards with minimal lift | -| Full Card (Level 3) | Ring + Subtle + `rgba(0,0,0,0.04) 0px 8px 8px -8px` + inner `#fafafa` ring | Featured cards, highlighted panels | +| Full Card (Level 3) | Ring + Subtle + `rgba(0,0,0,0.04) 0px 8px 8px -8px` + inner light-mode glow | Featured cards, highlighted panels | +| Full Card Dark (Level 3d) | Dark Ring + `rgba(0,0,0,0.20) 0px 2px 2px` + `rgba(0,0,0,0.28) 0px 8px 8px -8px` + inner `rgba(255,255,255,0.03)` glow | Featured dark cards, dialogs, menus | | Focus (Accessibility) | `2px solid hsla(212, 100%, 48%, 1)` outline | Keyboard focus on all interactive elements | -**Shadow Philosophy**: Vercel has arguably the most sophisticated shadow system in modern web design. Rather than using shadows for elevation in the traditional Material Design sense, Vercel uses multi-value shadow stacks where each layer has a distinct architectural purpose: one creates the "border" (0px spread, 1px), another adds ambient softness (2px blur), another handles depth at distance (8px blur with negative spread), and an inner ring (`#fafafa`) creates the subtle highlight that makes the card "glow" from within. This layered approach means cards feel built, not floating. +**Shadow Philosophy**: Vercel has arguably the most sophisticated shadow system in modern web design. Rather than using shadows for elevation in the traditional Material Design sense, Vercel uses multi-value shadow stacks where each layer has a distinct architectural purpose: one creates the "border" (0px spread, 1px), another adds ambient softness (2px blur), another handles depth at distance (8px blur with negative spread), and an inner ring creates the subtle highlight that makes the card "glow" from within. In light mode that inner ring is `#fafafa`; in dark mode it becomes a restrained low-alpha white. This layered approach means cards feel built, not floating. ### Decorative Depth - Decorative gradients should be minimal to nonexistent in the core app shell @@ -266,6 +281,7 @@ What distinguishes Vercel from other monochrome design systems is its shadow-as- - Use multi-layer shadow stacks for cards (border + elevation + ambient + inner highlight) - Keep the color palette achromatic — grays from `#171717` to `#ffffff` are the system - Use `#171717` instead of `#000000` for primary text — the micro-warmth matters +- Keep dark mode on the same system by swapping tokens, not by inventing a second visual language - Keep AI capture attachments as visually important as typed input - Surface validation issues inline on timeline cards when event data is invalid @@ -279,7 +295,8 @@ What distinguishes Vercel from other monochrome design systems is its shadow-as- - Don't use heavy shadows (> 0.1 opacity) — the shadow system is whisper-level - Don't increase body text letter-spacing — Geist is designed to run tight - Don't use pill radius (9999px) on primary action buttons — pills are for badges/tags only -- Don't skip the inner `#fafafa` ring in card shadows — it's the glow that makes the system work +- Don't reuse the light-mode `#fafafa` inner ring on dark surfaces; use the dark equivalent low-alpha white glow instead +- Don't make dark mode a generic black inversion with undifferentiated cards, menus, and inputs ## 8. Responsive Behavior @@ -326,6 +343,7 @@ What distinguishes Vercel from other monochrome design systems is its shadow-as- - Border (shadow): `rgba(0, 0, 0, 0.08) 0px 0px 0px 1px` - Link: Link Blue (`#0072f5`) - Focus ring: Focus Blue (`hsla(212, 100%, 48%, 1)`) +- Dark-mode background: `#121212`; primary dark surface: `#181818`; input/tool surface: `#1d1d1d` ### Example Component Prompts - "Create a desktop app shell with a thin infrastructure bar and a top-row two-section workspace. The AI capture section and timeline section start on the same vertical level, but the timeline has more width and deeper continuation. Use white surfaces, shadow-borders, Geist headings, and restrained metadata accents." @@ -339,5 +357,5 @@ What distinguishes Vercel from other monochrome design systems is its shadow-as- 2. Letter-spacing scales with font size: -2.4px at 48px, -1.28px at 32px, -0.96px at 24px, normal at 14px 3. Three weights only: 400 (read), 500 (interact), 600 (announce) 4. Color is functional, never decorative — accent colors mark real event state, utility emphasis, or warnings only -5. The inner `#fafafa` ring in card shadows is what gives Vercel cards their subtle inner glow +5. The inner glow stays theme-aware: `#fafafa` in light mode, restrained low-alpha white in dark mode 6. Geist Mono uppercase for technical labels, Geist Sans for everything else diff --git a/src/app/globals.css b/src/app/globals.css index ab9f289..d8e4d30 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -39,61 +39,50 @@ --radius: 0.625rem; --shadow-2xs: 0 0 0 1px rgba(0, 0, 0, 0.08); --shadow-xs: 0 0 0 1px rgba(0, 0, 0, 0.08); - --shadow-sm: - 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 2px rgba(0, 0, 0, 0.04); + --shadow-sm: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 2px rgba(0, 0, 0, 0.04); --shadow: - 0 0 0 1px rgba(0, 0, 0, 0.08), - 0 2px 2px rgba(0, 0, 0, 0.04), - 0 8px 8px -8px rgba(0, 0, 0, 0.04), - 0 0 0 1px #fafafa; + 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 2px rgba(0, 0, 0, 0.04), + 0 8px 8px -8px rgba(0, 0, 0, 0.04), 0 0 0 1px #fafafa; --shadow-md: - 0 0 0 1px rgba(0, 0, 0, 0.08), - 0 2px 2px rgba(0, 0, 0, 0.04), - 0 8px 8px -8px rgba(0, 0, 0, 0.04), - 0 0 0 1px #fafafa; - --shadow-lg: - 0 0 0 1px rgba(0, 0, 0, 0.08), - 0 8px 24px rgba(0, 0, 0, 0.08); - --shadow-xl: - 0 0 0 1px rgba(0, 0, 0, 0.08), - 0 16px 40px rgba(0, 0, 0, 0.12); - --shadow-2xl: - 0 0 0 1px rgba(0, 0, 0, 0.08), - 0 24px 56px rgba(0, 0, 0, 0.16); + 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 2px rgba(0, 0, 0, 0.04), + 0 8px 8px -8px rgba(0, 0, 0, 0.04), 0 0 0 1px #fafafa; + --shadow-lg: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.08); + --shadow-xl: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.12); + --shadow-2xl: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 24px 56px rgba(0, 0, 0, 0.16); --tracking-normal: -0.01em; --spacing: 0.25rem; } .dark { - --background: #111111; + --background: #121212; --foreground: #f5f5f5; - --card: #171717; + --card: #181818; --card-foreground: #f5f5f5; - --popover: #171717; + --popover: #181818; --popover-foreground: #f5f5f5; --primary: #f5f5f5; --primary-foreground: #171717; - --secondary: #1f1f1f; + --secondary: #1d1d1d; --secondary-foreground: #f5f5f5; - --muted: #1a1a1a; - --muted-foreground: #a1a1a1; - --accent: #1f1f1f; + --muted: #1b1b1b; + --muted-foreground: #a3a3a3; + --accent: #202020; --accent-foreground: #f5f5f5; --destructive: #ff5b4f; --destructive-foreground: #ffffff; --border: rgba(255, 255, 255, 0.1); - --input: rgba(255, 255, 255, 0.12); + --input: #242424; --ring: hsla(212, 100%, 48%, 1); --chart-1: #f5f5f5; --chart-2: #0a72ef; --chart-3: #de1d8d; --chart-4: #a1a1a1; --chart-5: rgba(255, 255, 255, 0.1); - --sidebar: #171717; + --sidebar: #181818; --sidebar-foreground: #f5f5f5; --sidebar-primary: #f5f5f5; --sidebar-primary-foreground: #171717; - --sidebar-accent: #1f1f1f; + --sidebar-accent: #202020; --sidebar-accent-foreground: #f5f5f5; --sidebar-border: rgba(255, 255, 255, 0.1); --sidebar-ring: hsla(212, 100%, 48%, 1); @@ -101,24 +90,23 @@ --shadow-2xs: 0 0 0 1px rgba(255, 255, 255, 0.08); --shadow-xs: 0 0 0 1px rgba(255, 255, 255, 0.08); --shadow-sm: - 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 2px rgba(0, 0, 0, 0.24); + 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 2px rgba(0, 0, 0, 0.2), + 0 0 0 1px rgba(255, 255, 255, 0.03); --shadow: - 0 0 0 1px rgba(255, 255, 255, 0.08), - 0 2px 2px rgba(0, 0, 0, 0.24), - 0 8px 8px -8px rgba(0, 0, 0, 0.32); + 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 2px rgba(0, 0, 0, 0.2), + 0 8px 8px -8px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.03); --shadow-md: - 0 0 0 1px rgba(255, 255, 255, 0.08), - 0 2px 2px rgba(0, 0, 0, 0.24), - 0 8px 8px -8px rgba(0, 0, 0, 0.32); + 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 2px rgba(0, 0, 0, 0.2), + 0 8px 8px -8px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.03); --shadow-lg: - 0 0 0 1px rgba(255, 255, 255, 0.08), - 0 12px 28px rgba(0, 0, 0, 0.32); + 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.28), + 0 0 0 1px rgba(255, 255, 255, 0.03); --shadow-xl: - 0 0 0 1px rgba(255, 255, 255, 0.08), - 0 20px 44px rgba(0, 0, 0, 0.4); + 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 44px rgba(0, 0, 0, 0.36), + 0 0 0 1px rgba(255, 255, 255, 0.03); --shadow-2xl: - 0 0 0 1px rgba(255, 255, 255, 0.08), - 0 28px 64px rgba(0, 0, 0, 0.48); + 0 0 0 1px rgba(255, 255, 255, 0.08), 0 28px 64px rgba(0, 0, 0, 0.42), + 0 0 0 1px rgba(255, 255, 255, 0.03); } @theme inline { @@ -224,9 +212,12 @@ body { @apply bg-background text-foreground; } -} - -@layer utilities { + html { + color-scheme: light; + } + html.dark { + color-scheme: dark; + } } @utility scrollbar-none { diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 05b7e3c..d35d3a7 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -33,7 +33,8 @@ export default function RootLayout({ > @@ -44,7 +45,7 @@ export default function RootLayout({ richColors toastOptions={{ className: - "rounded-[10px] bg-card text-card-foreground shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_12px_40px_rgba(0,0,0,0.12)]", + "rounded-[10px] bg-card text-card-foreground shadow-lg", }} /> diff --git a/src/app/manifest.ts b/src/app/manifest.ts index cf8de0d..375fe67 100644 --- a/src/app/manifest.ts +++ b/src/app/manifest.ts @@ -8,7 +8,7 @@ export default function manifest(): MetadataRoute.Manifest { start_url: "/", display: "standalone", background_color: "#ffffff", - theme_color: "#000000", + theme_color: "#ffffff", icons: [ { src: "/icon-192x192.png", diff --git a/tests/legacy-design-migration.test.ts b/tests/legacy-design-migration.test.ts index f64372b..e6bbe3a 100644 --- a/tests/legacy-design-migration.test.ts +++ b/tests/legacy-design-migration.test.ts @@ -21,8 +21,11 @@ describe("legacy design migration", () => { expect(layout).not.toContain("Local iCal"); expect(layout).not.toContain("editor for calendar events"); expect(layout).not.toContain("glass-strong"); + expect(layout).toContain('defaultTheme="light"'); + expect(layout).toContain("enableColorScheme"); expect(manifest).not.toContain("local-ical"); expect(manifest).not.toContain("Local iCal editor"); + expect(manifest).toContain('theme_color: "#ffffff"'); }); test("auth screens use console surfaces instead of old glass cards", () => {