Skip to content

Replace the generated design vocabulary in the JS templates - #189

Merged
timkpaine merged 1 commit into
mainfrom
tkp/replace-generated-design-vocabulary
Sep 2, 2026
Merged

Replace the generated design vocabulary in the JS templates#189
timkpaine merged 1 commit into
mainfrom
tkp/replace-generated-design-vocabulary

Conversation

@timkpaine

Copy link
Copy Markdown
Member

Five JavaScript extensions shipped the same design system into every project generated from them. Two unrelated sites built from this template — tim.paine.nyc and a Hasan Piker clip archive — turned out to be recognisably the same design, down to a moon icon path differing by three tenths of a unit.

The common source is here.

What every generated project was getting

Tokens paper / ink / muted / line / accent
Accent #6cff8f, applied wherever a page looked flat
Eyebrow .eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase }
Headline h1 { font-size: clamp(3rem, 10vw, 8rem); line-height: .85; letter-spacing: -.06em }

Affected: uitk-svelte, uitk-webawesome, site-react, site-sveltekit, site-webawesome.

Changes

Tokens are named for the role a color plays, not a material it imitates.

paper → bg          ink   → fg
                    muted → fg-muted
line  → border      accent → (removed)
                    bg-raised, focus (new)

Roles survive a redesign; metaphors have to be renamed or quietly start lying. paper/ink also carry an aesthetic — they presume a print look before the consumer has chosen one.

The decorative accent is gone. focus replaces it and is the only non-neutral color left, because a focus ring is an accessibility requirement rather than a flourish. A single accent applied wherever a page looks flat is precisely how unrelated products end up looking identical.

Defaults are plain greys, documented as placeholders. They exist so a generated project renders legibly on first run, not because they are anyone's brand.

The eyebrow and the oversized headline are removed from both toolkit galleries and all three site templates.

BRAND.md no longer ships a filled-in palette that consumers keep by default. It is now a table to complete, plus the two rules worth keeping whatever the palette becomes.

Verification

All five templates render, lint, type-check and build:

copier copy . <out> --data-file examples/<t>.yaml   # ✓ ×5
pnpm lint && pnpm check && pnpm build               # ✓ ×5

Contrast on the shipped defaults, computed against WCAG 2.1 relative luminance:

Pair Light Dark Needs
fg on bg 17.93 16.00 4.5
fg on bg-raised 16.59 14.56 4.5
fg-muted on bg 6.69 7.70 4.5
fg-muted on bg-raised 6.19 7.00 4.5
focus on bg 6.62 8.97 3.0
focus on bg-raised 6.13 8.16 3.0

Breaking change

This renames the public CSS custom-property contract. Existing generated projects will conflict on copier update and must map the old names to the new ones. Given the tokens are the thing being fixed, a rename is the point rather than a side effect.

timkpaine/ui has already moved off this vocabulary independently (timkpaine/ui#3) and will conflict on these files regardless.

Five JavaScript extensions shipped the same design system to every project
generated from them: paper/ink/muted/line tokens, a single acid accent at
#6cff8f, an .eyebrow rule at 0.14em tracking, and an h1 clamped to 8-10rem
at 0.85 line height. Two unrelated sites built from this template were
recognisably the same design.

Tokens are now named for the role a color plays rather than a material it
imitates: bg, bg-raised, fg, fg-muted, border, focus. The decorative accent
is gone; focus is a functional requirement and is the only non-neutral
color left. Defaults are plain greys and are documented as placeholders.

Every foreground clears WCAG AA against both surfaces in both themes, and
the focus ring clears 3:1.

The eyebrow rule and the oversized headline are removed from the toolkit
galleries and the site templates.

BRAND.md no longer ships a filled-in palette for consumers to keep by
default; it is a table to complete, with the two rules worth keeping
whatever the palette becomes.
@timkpaine
timkpaine merged commit 552b2de into main Sep 2, 2026
19 checks passed
@timkpaine
timkpaine deleted the tkp/replace-generated-design-vocabulary branch September 2, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant