Token pipeline 2.0: adopt the wb variable export - #88
Draft
librowski wants to merge 3 commits into
Draft
Conversation
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.
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.
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.
Switches the token build to the refreshed Figma variable export and adopts the
--wb-*names across every workspace.tokens.jsonfrom 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 duplicatedacc7ramp is gone,gray-900-75carries its documented alpha,gray-100-85exists, brand is#3969FF.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._provisional.cssand both of its wire-ups are gone; everything it carried ships from the export.--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.--wb-*; the generator classifies colors again instead of labelling every variable a size.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 checkstill fails on pre-existing Starlight typings, unchanged from the base branch and outside the CI gate.