Theming — @theme inline wiring + base-color token presets
Accept the two buildable theming slices; the live editor is split out as deferred
Review verdict (2026-05-28)
Accept the two buildable theming slices; the live editor is split out as deferred ([[rfc-patties-ui-theme-editor]]).
Scope pins:
@theme inlinewiring is the canonical Tailwind v4 mechanism (matrix had it "specced"). patties does not ownapp.css; the wiring is a snippet the CLI prints (viapatties ui init), never auto-edits.- Base-color presets ship as alternate
tokens.csspayloads underpatties-ui/templates/themes/(e.g.neutral/slate/stone/zinc), selected at stamp time via--theme <name>(onaddorui init). No persistedbaseColorconfig key — the preset is a one-time stamp choice the user then edits (consistent with the convention-over-config stance). - Dark mode stays divergent:
.darkon<html>, zero JS theming dep, nonext-themes— recorded, not changed here.
Encoded into ui/62-theming-presets.
Summary
Define the canonical Tailwind v4 @theme inline wiring snippet patties prints, and add stamp-time base-color token presets via --theme <name>.
Motivation
shadcn offers a base-color/preset system and documents @theme inline. patties shipped the default token set but had no preset choice and no canonical wiring doc.
Proposal
- Ship
templates/themes/<name>/tokens.csspreset payloads;--theme <name>merges the chosen values via the existing idempotent token merge (tokens.ts). patties ui initprints the@theme inlinemapping for the shipped tokens.
Trade-offs
- A preset is stamp-time only (not reconfigurable later) — but the user owns
tokens.cssand edits freely, so this matches copy-in.
Open questions
- Shareable preset codes/URLs across projects → split to [[rfc-patties-ui-theme-editor]] (deferred).