Space & shapeMarkdown
Elevation
Raised surfaces adapt to the active color mode: light mode uses low-alpha Obsidian shadows (y = half blur), while dark mode uses 1px neutral borders at step 6 or step 7.
Elevation scale
| Token | Tailwind | Light mode (shadow) | Dark mode (border) | Sample |
|---|---|---|---|---|
| --shadow-sm | shadow-sm | 0 1px 2px hsl(220, 6%, 5%, 0.08) | 0 0 0 1px var(--obsidian-6) | sm |
| --shadow-md | shadow-md | 0 3px 6px hsl(220, 6%, 5%, 0.08) | 0 0 0 1px var(--obsidian-6) | md |
| --shadow-lg | shadow-lg | 0 6px 12px hsl(220, 6%, 5%, 0.08) | 0 0 0 1px var(--obsidian-7) | lg |
| --shadow-xl | shadow-xl | 0 12px 24px hsl(220, 6%, 5%, 0.08) | 0 0 0 1px var(--obsidian-7) | xl |
Pair raised cards with a surface step from the 30% band (bg-card) over a 60% canvas (bg-background).
Usage
Apply shadow utilities in Tailwind CSS or --shadow-* variables in CSS:
<div className="rounded-lg bg-card p-6 text-card-foreground shadow-md">
<h2 className="font-display text-h5">Raised panel</h2>
<p className="mt-2 font-sans text-body text-muted-foreground">
Renders a 3px/6px shadow in light mode and a 1px step-6 border in dark mode.
</p>
</div>.popover-surface {
background-color: var(--popover);
color: var(--popover-foreground);
box-shadow: var(--shadow-lg);
}Do and don't
Do: Use --shadow-* tokens across both modes
Apply shadow-sm through shadow-xl so light mode renders directional shadows and dark mode renders crisp 1px neutral borders automatically.
Don't: Use drop shadows in dark mode or blur effects
Do not hardcode black rgba() shadows in dark mode or apply backdrop-blur glassmorphism over dark surfaces.
Accessibility
- Dark-mode border tokens (
--obsidian-6and--obsidian-7) keep card and popover boundaries distinct without relying on invisible dark shadows.
Rationale
Shadows disappear on near-black Obsidian canvases, so swapping shadows for step-6 and step-7 borders preserves depth hierarchy in dark mode without extra markup.