githubnext/chopinPublic

Let's compose rich plans together

Emit all theme tokens, fix callout colours, load Inter #9

MergedMaggieAppletonmerged 2 commits intomainfromrefs/pull/9/head
  1. MA

    Four fixes in the theme layer, all of them things that silently never reached the browser.

    ### Callout colours

    `tip`, `important` and `warning` pointed at `--color-chart-2/4/5`, which this theme has never declared. An undefined custom property does not fall back โ€” it invalidates the whole declaration, so `border-color` reset to `currentColor` and three of the five callout types drew their bar in the text colour. They now point at the tokens the MDXEditor admonition variables directly above them already claim.

    ### Pruned tokens

    `--color-success` still failed after that fix, for a different reason. Tailwind emits a theme variable only where it can see a utility class using it, and it looks for those in the content files rather than the stylesheets โ€” so a token read solely through `var()` in hand-written CSS was declared and then pruned. `--color-warning` beside it worked by luck, because a `text-warning` class happens to exist elsewhere. `@theme static` emits the palette whole, which matters more the further up the stack you go.

    ### Inter

    `InterVariable` was named in two places and installed in none, so the editor had been falling back to the system font since it was written. The stack is now declared once as `--font-sans`, and the font is loaded in `main.tsx` โ€” the optical-sizing cut, roman and italic, since italic is a separate face rather than a slant and a plan leans on emphasis. `unicode-range` keeps a Latin document to two files.

    ### Guard

    `scripts/check-tokens.ts` runs in `bun run ci`. It fails on any `var()` that cannot resolve, and separately on an `@theme` that loses `static`, which would silently invalidate the first check. It reads sources only: a built `dist` carries third-party CSS naming tokens we neither wrote nor can define.

    Also adds `--color-surface`, so the rails and header recede and the plan is the only white surface on the page.

    ### Verification

    `bun run ci`, `bun run types` and `bun run build` green. `--color-success` confirmed present in the emitted CSS, and both Latin Inter faces confirmed in the build output.

    ๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code)

    ---

    ### Stack

    Merge bottom-up. Each PR targets the one below it, so every diff reads in isolation; GitHub retargets the child automatically as each parent merges.

    1. #9  โ€” Emit all theme tokens, fix callout colours, load Inter  โ†  `main` 2. #10 โ€” Add two-stop shadow scale tokens 3. #11 โ€” Add radius tokens and replace bare rounded classes 4. #12 โ€” Add type scale tokens, replace arbitrary font sizes 5. #13 โ€” Add easing and duration tokens, set transition defaults 6. #15 โ€” Add one focus-visible outline rule for all controls 7. #16 โ€” Scale buttons down on press 8. #17 โ€” Add tabular-nums to figures and balance plan headings 9. #18 โ€” Shorten empty states and composer status copy 10. #19 โ€” Add entrance animation for newly arrived items

    Plan: `docs/superpowers/plans/2026-08-04-design-token-foundation.md`

  2. MaggieAppletonreferenced this in Add two-stop shadow scale tokens #103 months ago on GitHub

  3. MaggieAppletonreferenced this in Add radius tokens and replace bare rounded classes #113 months ago on GitHub

  4. MaggieAppletonreferenced this in Add type scale tokens, replace arbitrary font sizes #123 months ago on GitHub

  5. MaggieAppletonreferenced this in Add easing and duration tokens, set transition defaults #133 months ago on GitHub

  6. MaggieAppletonreferenced this in Add one focus-visible outline rule for all controls #153 months ago on GitHub

  7. MaggieAppletonreferenced this in Scale buttons down on press #163 months ago on GitHub

  8. MaggieAppletonreferenced this in Add tabular-nums to figures and balance plan headings #173 months ago on GitHub

  9. MaggieAppletonreferenced this in Shorten empty states and composer status copy #183 months ago on GitHub

  10. MaggieAppletonreferenced this in Animate newly received messages and status indicators #193 months ago on GitHub

  11. MaggieAppletonhead-ref-force-pushed 9dfeebeb839c3 months ago on GitHub

  12. MaggieAppletonrenamed Make every token in the theme reach the browser to Emit all theme tokens, fix callout colours, load Inter3 months ago on GitHub

  13. MaggieAppletonhead-ref-force-pushed a81b3818d9373 months ago on GitHub

  14. MaggieAppletonhead-ref-force-pushed 5d0cc9034f7e3 months ago on GitHub

  15. MaggieAppletonmerged 564cbbf50bce3 months ago on GitHub

  16. MaggieAppletonclosed3 months ago on GitHub

  17. MaggieAppletonhead-ref-deleted3 months ago on GitHub