prototype(#53): palette candidates as runtime token swaps
Throwaway. Tokenises the theme's literal colours so candidate palettes can be swapped in the browser, adds three candidates (Plum Noir one-metal, two-metal pewter, two-metal plus a champagne inset), a WCAG checker, a seeder and the screenshots they are judged on. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# Throwaway prototype for #53 — palette candidates on a dense page
|
||||
|
||||
Not for merge. The theme SCSS on this branch is mechanically tokenised (literal
|
||||
hexes and `rgba()` triples turned into `var(--wg-*)`) so a candidate palette can
|
||||
be swapped at runtime instead of rebuilt per candidate.
|
||||
|
||||
- `contrast.py` — WCAG check for every candidate surface/ink pair. Run first.
|
||||
- `_base-plumnoir.css` + `candidate-{a,b,c}.css` — the candidates, as `:root` overrides.
|
||||
- `seed.js` — categories + one 13-post topic with a quote, over the REST API.
|
||||
- `shots.js` / `probe.js` — screenshots and a computed-style probe, both against the live stack.
|
||||
- `shots/` — the images the resolution is judged on.
|
||||
|
||||
Replay:
|
||||
|
||||
```bash
|
||||
cd ../sow-nodebb && nix develop --command make dev-reset && nix develop --command make dev
|
||||
cd - && node prototype/seed.js
|
||||
export PLAYWRIGHT_BROWSERS_PATH=$(nix build --print-out-paths --no-link nixpkgs#playwright-driver.browsers)
|
||||
P=$(nix build --print-out-paths --no-link nixpkgs#playwright-test)
|
||||
NODE_PATH=$P/lib/node_modules nix shell nixpkgs#playwright-test -c node prototype/shots.js
|
||||
```
|
||||
Reference in New Issue
Block a user