Skip to content

feat: update tokens from Tokens Studio release - #5280

Merged
pomfrida merged 3 commits into
mainfrom
tokens-studio-release
Aug 5, 2026
Merged

feat: update tokens from Tokens Studio release#5280
pomfrida merged 3 commits into
mainfrom
tokens-studio-release

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Automated pull of the token state after a Tokens Studio release: raw token sets via studio tokens pull (sources in packages/eds-tokens/.studio.json), generated CSS (EDS-CSS export) into packages/eds-tokens/src/tokens/css/, DTCG (EDS-DTCG export) into src/tokens/dtcg/, TypeScript modules generated from the two into src/tokens/ts/, and the bundled src/tokens/css/variables.css (concatenation of the CSS export, per ADR-0010). The semantic/*.css files are widened to :root, [data-color-scheme] by scripts/widen-semantic-scope.mjs before bundling (#5226) — that selector diff against the raw export is expected.

@pomfrida

pomfrida commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

@claude review

@claude

claude Bot commented Aug 5, 2026

Copy link
Copy Markdown

Claude finished @pomfrida's task in 5m 7s —— View job


Review: token release PR

  • Read PR context and generated-file conventions
  • Diff CSS exports (added / removed / changed tokens)
  • Check for breaking removals or renames consumed by components
  • Verify bundle variables.css matches the per-file exports + widened scope
  • Cross-check DTCG / TS / raw outputs are consistent
  • Post review

This is not a routine token bump — it's a full replacement of the semantic colour vocabulary. 55 semantic names are removed and ~180 added, plus a new data-visualization layer. The generated artifacts themselves are clean; the issues are in what the rename breaks and what it silently changes.

What I verified

Check Result
variables.css reproducible ✅ re-ran widen-semantic-scope.mjs + generate-css-bundle.mjs → byte-identical, no diff
ts/* reproducible ✅ re-ran generate-ts-tokens.mjs → byte-identical, no diff
Semantic layer widened to :root, [data-color-scheme] ✅ present, script reports "already widened"
Dangling var() references in the bundle ✅ 0 missing (887 defined, 530 referenced)
Self-referential tokens ✅ 0 — this PR fixes the --eds-border-focus: var(--eds-border-focus) cycle on main
CSS ↔ DTCG parity (semantic) ✅ 245 = 245
studio.lock ✅ hashes/sizes move consistently with the four changed sources (color/*, scheme/*, semantic.json)
colors/default.css ✅ purely additive (dataviz primitives), no scale value changed

🔴 Blocking: one in-repo consumer breaks

packages/eds-core-react/.storybook/preview.css:23 uses a token this PR deletes:

.eds-storybook-wrapper {
  background-color: var(--eds-background-container-canvas-default); /* ← removed */
}

There is no fallback, so the Storybook canvas background silently becomes transparent in both schemes, and nothing in CI fails (unresolved custom properties are not a build error). The replacement is --eds-background-canvas — same value (--eds-neutral-1), so it's a one-word fix.

Fix this →

That's the only broken reference — I grepped every package and app; nothing else consumes the removed names. (documentation/adr/0009-*.md:9 cites --eds-background-container-* as an example of the new vocabulary, now stale, but an ADR is a historical record so leaving it is defensible.)


🟠 Silent value changes behind surviving names

Three tokens keep their name but change meaning. Any consumer already on the beta line gets a visual change with no diff signal on their side:

Token Before After Effect
--eds-text-accent --eds-info-8 (blue) --eds-accent-12 (teal) Hue change. The old "accent = link blue" role moved to --eds-text-interactive-link-default.
--eds-icon-accent --eds-accent-13 --eds-accent-12 Lighter
--eds-icon-primary --eds-neutral-10 --eds-neutral-12 Darker (contrast improves 5.0 → 9.9 in light)

--eds-text-accent is the one to call out in the release notes: it survives the rename, so a consumer's build stays green while the colour flips from blue to teal.

🟠 Worth an explicit changelog rename map

The beta is on the next/* subpaths (ADR-0009), so churn is expected — but every failure mode here is silent (CSS custom properties) or a type error only for next/ts/*. Inferred mapping from the diff, for whoever writes the release note:

background-container-canvas-default   → background-canvas
background-container-card-default     → background-surface
background-container-popover-default  → background-floating
background-container-popover-inverted → background-inverted
background-container-sheet-dialog-*   → background-dialog
background-surface-default-{h,p,…}    → background-interactive-neutral-muted-*
background-surface-default-read-only  → background-interactive-read-only  (neutral-1 → neutral-2)
background-surface-default-disabled   → background-interactive-disabled   (neutral-1 → neutral-2)
background-surface-accent-*           → background-interactive-accent-*
border-{default,emphasized,subtle}    → border-neutral-{medium,strong,subtle}
border-{focus,disabled}               → border-interactive-{focus,disabled}
border-selected                       → border-interactive-selected-indicator
{icon,text}-muted                     → {icon,text}-tertiary
{icon,text}-on-accent                 → {icon,text}-on-emphasis
{icon,text}-disabled                  → {icon,text}-interactive-disabled
{icon,text}-color-on-{dark,light}     → {icon,text}-{inverted,primary}
status-warning-*                      → background-{,interactive-}warning-*

The ts/* shape changes too: semantic.background.container.canvas.defaultsemantic.background.canvas, i.e. the leaf .default collapses across most of the tree.

🟡 Light-scheme contrast (pre-existing, not a regression)

Computed from the new bundle (oklch → sRGB, WCAG 2.1). Dark scheme passes everything; light scheme has three below AA 4.5:1:

Pair Light Dark
text-tertiary / icon-tertiary on background-canvas 2.34 ❌ (below 3:1) 4.90
text-secondary / icon-secondary on background-canvas 3.44 8.64
text-interactive-link-default on background-canvas 3.38 8.74
text-on-emphasis on each *-emphasis-default 5.32–6.18 ✅ 10.9–12.1 ✅

All three carry over unchanged from main (neutral-7, neutral-8, info-8 respectively), so this PR doesn't cause them — but the rename text-mutedtext-tertiary makes a 2.34:1 value read like ordinary body text rather than de-emphasised chrome, which invites misuse. Worth an upstream issue against the Tokens Studio source rather than a patch here.

🟡 Stale script comments (follow-up, non-blocking)

generate-css-bundle.mjs and widen-semantic-scope.mjs both document the #5221 caveat — "three names (border-focus, text-disabled, border-disabled) are declared in both the color-scheme layer and the semantic layer". I checked: cross-layer duplicates are now 0. The rename to border-interactive-focus / text-interactive-disabled / border-interactive-disabled resolved it upstream. The layerRank sort that concatenates color-scheme/ last is now a no-op safety net rather than a load-bearing cascade fix. #5221 looks closeable, and the comments should be updated to say the sort is defensive.


Verdict

Generated output is correct and reproducible, and it fixes a real bug (the focus-ring self-reference). Fix preview.css:23 before merging, and flag --eds-text-accent in the release notes. The contrast and stale-comment items are follow-ups.

I have not committed anything — the working tree is clean after my regeneration checks. Say the word if you'd like me to push the preview.css fix.
• branch tokens-studio-release

@pomfrida

pomfrida commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Waiting on pushing the fix until @alexlvrs / @eddiman has verified the rest of the review

eddiman
eddiman previously approved these changes Aug 5, 2026

@eddiman eddiman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for change LGTM. Regarding a11y-issues: We dont use any of those colors on bg-canvas, så claude is dramatic .

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.

2 participants