fix(theme): regenerate theme-kumo.css to sync with config.ts#365
fix(theme): regenerate theme-kumo.css to sync with config.ts#365singkia wants to merge 4 commits intocloudflare:mainfrom
Conversation
The committed theme-kumo.css was out of sync with the theme generator config. Running `codegen:themes` produces a different output because: 1. Stale tokens: `--color-kumo-surface` and duplicate `--color-kumo-recessed` remained in the CSS despite being renamed/removed in config.ts (replaced by `--color-kumo-canvas`, `--color-kumo-elevated`, etc.) 2. Wrong fallback: `--color-kumo-fill-hover` dark value referenced `neutral-700` but config.ts specifies `neutral-800` 3. Ordering: surface-related tokens were placed before badge tokens in the mode-scoped blocks, but the generator outputs them after (following config.ts key insertion order) Fix: re-ran `pnpm codegen:themes` and committed the result. Amp-Thread-ID: https://ampcode.com/threads/T-019d58cd-b57b-75ac-9290-0f71d760fa4b Co-authored-by: Amp <amp@ampcode.com>
|
/bonk review |
There was a problem hiding this comment.
Review Summary
✅ Verified - All three issues described in the PR are accurate and correctly fixed:
-
Stale tokens removed:
--color-kumo-surfaceand duplicate--color-kumo-recesseddefinitions correctly removed from mode-scoped blocks (these tokens don't exist inconfig.ts) -
Wrong fallback fixed:
--color-kumo-fill-hoverdark mode now correctly referencesvar(--color-neutral-800, ...)instead ofvar(--color-neutral-700, ...), matchingconfig.tsline 328 -
Token ordering: Surface tokens now appear after badge tokens in mode-scoped blocks, matching the key insertion order in
config.ts
Changeset: Correctly marked as patch - this is a no-op bug fix that brings auto-generated CSS back into sync with the source of truth.
Good fix - stale generated files are a real pain for contributors.
|
✅ Review submitted and approved for PR #365. I've verified all three issues described in the PR against the
The changeset is correctly classified as a |
commit: |
Docs PreviewCommit: |
Amp-Thread-ID: https://ampcode.com/threads/T-019d6d1d-0875-7502-b7d6-8618b19b0597 Co-authored-by: Amp <amp@ampcode.com>




























































What
Regenerate
theme-kumo.cssby runningpnpm codegen:themesto bring the committed CSS back in sync with the theme generator source of truth (scripts/theme-generator/config.ts).Why
The committed
theme-kumo.csswas stale — it did not match what the theme generator produces from the currentconfig.ts. This means any contributor who runspnpm codegenwill see unexpected dirty files in their worktree, even on a clean checkout.Three specific issues:
Stale tokens:
--color-kumo-surfaceand a duplicate--color-kumo-recesseddefinition remained in the mode-scoped CSS blocks, despite being renamed/removed inconfig.ts(replaced by--color-kumo-canvas,--color-kumo-elevated, etc.)Wrong fallback value:
--color-kumo-fill-hoverdark mode referencedvar(--color-neutral-700, ...)butconfig.tsspecifiesvar(--color-neutral-800, ...)(the oklch value is the same, so no visual change, but the CSS variable reference was wrong)Token ordering: surface-related tokens were placed before badge tokens in the mode-scoped blocks, but the generator outputs them after badge tokens (following
config.tskey insertion order)Reproduction: on a clean checkout of
main, runpnpm --filter @cloudflare/kumo codegen:themesand observe 23 lines of diff intheme-kumo.css.Validation Checklist
git checkout -- theme-kumo.css→codegen:themes→ identical diff every timetheme-fedramp.cssis unaffected (no diff)AI disclosure
This PR was prepared with Amp. The agent identified the stale codegen output, reproduced the issue, and drafted the PR.