Repository navigation
Update Figma design tokens - #4905
Gert-Jan Vercauteren (gert-janvercauteren) merged 8 commits into
Conversation
|
Visit https://backpack.github.io/storybook-prs/4905 to see this build running in a browser. |
The token sync was adding all Type primitive tokens (font sizes, line heights, letter spacing, weights, families) to primitives.css. These should be excluded for the same reason color primitives are excluded — consumers should use semantic tokens, not raw primitives. Adds `token.path[0] !== 'Type'` to `makeWebPrimitivesTokenFilter` and removes the already-committed `--bpk-type-*` variables from primitives.css. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4905 to see this build running in a browser. |
Line-height tokens from Figma are absolute px values, not multipliers. Removing LINE_HEIGHT from NUMBER_FLOAT_SCOPES causes them to be typed as `dimension` (not `number`), so the pxToRem transform converts them to rem. primitives.json is updated with "Xpx" string values and $type: "dimension" for Type/Line-height. The primitives filter is narrowed to allow Type/Letter-spacing and Type/Line-height through (previously all Type tokens were excluded); Size, Family, Weight, etc. remain excluded. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
The LINE_HEIGHT dimension fix from the previous commit also affects semantic typography tokens in the theme files — line-height values that aliased back to Type/Line-height primitives were previously emitted as unitless numbers (e.g. `24`) and are now correctly emitted as rem (e.g. `1.5rem`). Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4905 to see this build running in a browser. |
Letter-spacing and Line-height should not appear as primitives — consumers should use semantic tokens from the theme files. Reverts the primitives filter to exclude all Type tokens (same as Heights and colour primitives). The semantic theme files retain the rem values from the previous commit. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4905 to see this build running in a browser. |
Reverts the LINE_HEIGHT dimension change — line-heights should remain unitless numbers (multipliers), not px/rem values. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4905 to see this build running in a browser. |
Instead of excluding unwanted groups, explicitly allowlist the groups that should appear in primitives.css: Border, Modal, Radius, Spacing. New groups added to primitives.json are excluded by default until consciously added to PRIMITIVES_ALLOWLIST. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
Regenerated by tokens:build-css alongside the token sync changes. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4905 to see this build running in a browser. |
Gert-Jan Vercauteren (gert-janvercauteren)
left a comment
There was a problem hiding this comment.
LGTM,
Line height tokens will be revisited and re-sync from Figma.
They are not in use at the moment.
c7acde8
into
main
Summary
Automated Figma variable sync generated updates to Backpack design tokens and CSS custom properties.
Additionally rebuilds
packages/backpack-web/src/bpk-stylesheets/base.cssto incorporate the updated CSS custom properties.Release label:
majorRelease label rules:
major— an existing token path was removed, renamed, or had its value changed (consumer code may break).minor— only new token paths were added.Deleted or renamed tokens
The following token paths existed in the previous commit but are missing from the fetched tokens. Treat them as breaking changes and verify usages have been migrated.
backpack.dark.json
Component/Button/Dimension/min-height-largeComponent/Button/Dimension/min-weight-largeComponent/Button/Typography/tmp-default-labelTypography/Family/Sans SerifTypography/Family/SerifTypography/Kerning/DefaultTypography/Kerning/LooseTypography/Kerning/TightTypography/Line Heights/16Typography/Line Heights/20Typography/Line Heights/24Typography/Line Heights/28Typography/Line Heights/40Typography/Line Heights/48Typography/Line Heights/64Typography/Line Heights/76Typography/Line Heights/82Typography/Line Heights/96Typography/Line Heights/115Typography/Line Heights/120Typography/Line Heights/153Typography/Line Heights/192Typography/Sizes/12Typography/Sizes/14Typography/Sizes/20Typography/Sizes/24Typography/Sizes/32Typography/Sizes/40Typography/Sizes/48Typography/Sizes/64Typography/Sizes/76Typography/Sizes/96Typography/Sizes/120Typography/Sizes/144Typography/Sizes/192Typography/Sizes/240Typography/Sizes/baseTypography/Weight/BodyTypography/Weight/HeadlineTypography/Weight/HeroTypography/Weight/LabelTypography/Weight/Subheadbackpack.light.json
Component/Button/Dimension/min-height-largeComponent/Button/Dimension/min-weight-largeComponent/Button/Typography/tmp-default-labelTypography/Family/Sans SerifTypography/Family/SerifTypography/Kerning/DefaultTypography/Kerning/LooseTypography/Kerning/TightAnd 35 more deleted or renamed token path(s).
Changed token values
The following token values changed while the path stayed the same. Treat them as potentially breaking — visuals or behaviour driven by these tokens may shift.
backpack.dark.json
Component/Button/Colour/bg-feature-pressedComponent/Button/Colour/text-destructivebackpack.light.json
Component/Button/Dimension/padding-horizontal-defaultComponent/Button/Dimension/padding-horizontal-largeSource
schedule