Add vapor shell preset selection flow for host apps
This commit is contained in:
@@ -17,6 +17,7 @@ This module is the active reusable theme source for design-code consumers.
|
||||
- Pattern contracts should reference shared behavior contracts and rely on this module for visual primitives.
|
||||
- When baseline visuals change, update this module first to keep downstream integration deterministic.
|
||||
- For shell color selection, use `palette-catalog.md` and set `data-vapor-shell` on `<html>`.
|
||||
- For runtime switching, the recommended query key is `vapor_shell` (same IDs as the catalog).
|
||||
- Keep host-specific brand overrides outside this module unless they are reusable presets.
|
||||
|
||||
## Boundary
|
||||
|
||||
@@ -14,6 +14,17 @@ Optional: host project can override shell height without changing preset IDs:
|
||||
:root { --shell-height: 72px; }
|
||||
```
|
||||
|
||||
## Selection Approach
|
||||
|
||||
Recommended precedence for host integration:
|
||||
|
||||
1. `?vapor_shell=<preset-id>` query parameter (preview/share links)
|
||||
2. `localStorage["vapor_shell"]` (remembered user choice)
|
||||
3. `<html data-vapor-shell="...">` static default from server/templates
|
||||
4. fallback preset: `miami-sunset`
|
||||
|
||||
The scaffold and demo JavaScript implement this precedence.
|
||||
|
||||
## Presets (Header + Accent)
|
||||
|
||||
| Preset ID | Header core | Accent core | Default shell height |
|
||||
|
||||
Reference in New Issue
Block a user