Cards & Surfaces — Options
Same queue card + overlay under each candidate elevation system. The question: how do surfaces signal depth — border, shadow, or both?
Option A — Flat + border
Border only, no shadows anywhere (Linear-style).
Level 1 — card (queue item)
Jane Cooper
Acme Inc. — Step 2 of 5, due today.
Level 2 — overlay (dropdown / dialog)
Overlay content sits above cards.
- • Calmest; zero shadow maintenance
- • Dark-mode safe (shadows barely read on dark)
- • Overlays must rely on border weight — weaker depth cue
Option B — Border + 2-level elevation ✓ CHOSEN
Cards: border + shadow-sm. Overlays: border + shadow-md. Nothing else.
Level 1 — card (queue item)
Jane Cooper
Acme Inc. — Step 2 of 5, due today.
Level 2 — overlay (dropdown / dialog)
Overlay content sits above cards.
- • Codifies the app's de-facto card recipe (already used 15+ times)
- • Two named levels replace 8+ one-off shadow recipes
- • Border carries hierarchy in dark mode, shadow in light — accessible
Option C — Elevation-first
No borders; Material-style shadow scale carries all depth.
Level 1 — card (queue item)
Jane Cooper
Acme Inc. — Step 2 of 5, due today.
Level 2 — overlay (dropdown / dialog)
Overlay content sits above cards.
- • Softest, most “floating” look
- • Fails quietly in dark mode — shadows nearly invisible
- • Needs a full 4–5 level shadow scale to stay coherent
Show audit of the app before this rule
Audit — what we have today
- ✓ Surface tokens exist: --surface, --surface-elevated, --surface-muted, --card
- ✓ Card radius tokens exist: card-lg 24px, card-xl 32px, hero 36px
- ✗ Card base (rounded-xl + shadow) is overridden in ~all 98 usages — ~20 distinct recipes
- ✗ De-facto standard (border-border/70 + surface-elevated/80 + shadow-sm) used 15× but never codified
- ✗ 8+ one-off shadow recipes (shadow-[0_22px_40px…] ×16, colored glows) — no elevation scale
- ✗ rounded-[28px] hardcoded 15× — a radius that exists in no token
- ✗ 60 hand-rolled panels (rounded-2xl/3xl divs) bypass Card entirely
Shared rules (all options)
- • Named elevation levels (0 = page, 1 = card, 2 = overlay) — never one-off shadows
- • Depth never signaled by shadow alone — pair with border or background shift (accessibility)
- • Nested radius rule: inner = outer − padding (corners share a center)
- • Hover-lift (shadow gain) only on interactive cards
- • Radius comes from tokens — no arbitrary values like rounded-[28px]
Show research sources
Decision: Option B
- 1. Codify, don't rewrite. The border + surface-elevated + shadow-sm recipe was already the app's de-facto card (15+ copies). It became Card's default; the copies were deleted.
- 2. Accessible depth. Border carries hierarchy in dark mode where shadows vanish; shadow does the work in light mode. A (border-only) under-signals overlays; C (shadow-only) fails dark mode.
- 3. Two named levels killed 8+ one-off shadows. Level 1 = card (shadow-sm), level 2 = overlay (shadow-md+), plus a single `shadow-raised` token for marketing feature cards.
- Also fixed: rounded-[28px] ×15 → new `--radius-card` token (28px); arbitrary radii are now violations.