Replace the generated design vocabulary in the JS templates - #189
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Five JavaScript extensions shipped the same design system into every project generated from them. Two unrelated sites built from this template —
tim.paine.nycand 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
paper/ink/muted/line/accent#6cff8f, applied wherever a page looked flat.eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase }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.
Roles survive a redesign; metaphors have to be renamed or quietly start lying.
paper/inkalso carry an aesthetic — they presume a print look before the consumer has chosen one.The decorative accent is gone.
focusreplaces 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.mdno 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:
Contrast on the shipped defaults, computed against WCAG 2.1 relative luminance:
fgonbgfgonbg-raisedfg-mutedonbgfg-mutedonbg-raisedfocusonbgfocusonbg-raisedBreaking change
This renames the public CSS custom-property contract. Existing generated projects will conflict on
copier updateand 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/uihas already moved off this vocabulary independently (timkpaine/ui#3) and will conflict on these files regardless.