feat: theme toggle
This commit is contained in:
@@ -53,7 +53,12 @@ unreachable — the site must never 500 because Strapi is down.
|
||||
The site ships RTL Arabic; physical directions silently break it.
|
||||
Check: `grep -rnE "\b(pl|pr|ml|mr|left|right)-[0-9]" apps/web/app` → nothing meaningful.
|
||||
3. **Surfaces, not a theme.** `:root` *is* the dark surface; `data-surface="light"` flips a
|
||||
subtree and repaints itself. Do not add a global theme toggle or a `dark:` variant.
|
||||
subtree and repaints itself. Never add a second theme system or a `dark:` variant. **The
|
||||
one exception, accepted deliberately:** the nav's theme toggle flips *which* surface `<html>`
|
||||
stands on (dark default ↔ light), persisted via the `sharper-theme` cookie read in the root
|
||||
loader and set by the root action — SSR-rendered so the first byte and first paint always
|
||||
match. The mechanism stays surfaces-only: the toggle just re-roots them. `--surface-nav`
|
||||
must keep a value in BOTH surface blocks.
|
||||
4. **Figma is READ ONLY.** Only `get_design_context`, `get_screenshot`, `get_metadata`,
|
||||
`get_variable_defs`. Never call anything that writes (`use_figma`, `generate_figma_design`,
|
||||
`create_new_file`, `upload_assets`, shaders, plugins, …). Before the first
|
||||
|
||||
Reference in New Issue
Block a user