Skip to content

Token pipeline 2.0: adopt the wb variable export - #88

Draft
librowski wants to merge 3 commits into
ds2-chipsfrom
ds2-pipeline-switch
Draft

Token pipeline 2.0: adopt the wb variable export#88
librowski wants to merge 3 commits into
ds2-chipsfrom
ds2-pipeline-switch

Conversation

@librowski

@librowski librowski commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Switches the token build to the refreshed Figma variable export and adopts the --wb-* names across every workspace.

  • tokens.json from the WB Token Export plugin: Numerals retired, Canvas (root-scoped) and per-theme Effects sets added. 780 variables. Design-side fixes came with it: the duplicated acc7 ramp is gone, gray-900-75 carries its documented alpha, gray-100-85 exists, brand is #3969FF.
  • Dimension primitives are emitted in rem (px in, rem out, any other unit throws) so component boxes keep scaling with the reader's font size, as they did before. Shadow geometry stays px.
  • Every var(--ax-…) usage rewritten to its --wb-* equivalent: migration-map renames, prefix rules, and value-matched dimensions. Each value binds the family that owns it — radius from the radius scale, shadow geometry from the effects set, edge strokes from the canvas set.
  • Seven names had no mechanical target and were mapped by hand, preserving their rendered values per theme (sdk accent chips, list-item selected/destructive backgrounds).
  • _provisional.css and both of its wire-ups are gone; everything it carried ships from the export.
  • No compatibility bridge. Theming consumers use the unchanged --ax-public-* contract, and the stylelint guard fails the build on any name a rewrite might have missed. The changeset spells out the migration for anyone who overrode raw token names.
  • Public theming docs, the token README and the docs API generator now speak --wb-*; the generator classifies colors again instead of labelling every variable a size.
  • Intentional visual changes ride along: refreshed brand and status ramps, dark chip outline on acc1-400, list rows taking the hover fill so they stay lighter than their surface in the dark theme.

Two review rounds landed on top of the first two commits; the third commit is those findings.

Verified: token/ui/sdk/demo builds, docs build, 61 test files, stylelint clean, collision validator (now also across sets sharing one selector). astro check still fails on pre-existing Starlight typings, unchanged from the base branch and outside the CI gate.

The tokens.json export now comes from the WB Token Export plugin:
Numerals is gone, Canvas (root-scoped) and per-theme Effects sets are
in, and font-size primitives are emitted in rem while the other
dimensions stay in px, as the design docs specify. The provisional
stylesheet and both of its wire-ups go away - every value it carried
ships in tokens.css now.
Mechanical rewrite of every var(--ax-...) usage to its wb equivalent:
renames and prefix rules from the migration map plus value-matched
dimension tokens (the old numeral scales map 1:1 onto wb/space,
wb/size and wb/radius; two 100px pill radii become radius-full).
Hand-mapped leftovers keep their old rendered values per theme: the
accent chips in the sdk message and branch-card controls and the
list-item selected/destructive backgrounds, which the retired
dropdown tokens used to carry. No compatibility bridge: consumers
theme through the unchanged ax-public contract, and the stylelint
guard fails the build on any name this rewrite might have missed.
@librowski librowski changed the title ds2 pipeline switch Token pipeline 2.0: adopt the wb variable export Aug 21, 2026
The retired numeral primitives were authored in rem, so component boxes
scaled with the reader's font size; the refreshed export is px-authored,
which left text scaling while its containers stopped. Both transforms now
convert px to rem and refuse any other unit instead of emitting NaN.

Consumers bind the family that owns the value: radius from the radius
scale, shadow geometry and edge strokes from the effects and canvas sets.
List rows take the hover fill, which stays lighter than the surface they
sit on in the dark theme.

The docs API generator reads wb-prefixed definitions again, so component
variables are classified as colors instead of falling through to sizes.
Public theming docs point at names that exist, and the token README
documents the unit split and the new sets.
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