Skip to content
This repository was archived by the owner on Aug 5, 2026. It is now read-only.

Update Figma design tokens - #4905

Merged
Gert-Jan Vercauteren (gert-janvercauteren) merged 8 commits into
mainfrom
figma-token-sync/20260716182321-29523645254
Jul 17, 2026
Merged

Gert-Jan Vercauteren (gert-janvercauteren) merged 8 commits into
mainfrom
figma-token-sync/20260716182321-29523645254

Conversation

@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

Summary

Automated Figma variable sync generated updates to Backpack design tokens and CSS custom properties.

Additionally rebuilds packages/backpack-web/src/bpk-stylesheets/base.css to incorporate the updated CSS custom properties.

Release label: major

Release 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-large
  • Component/Button/Dimension/min-weight-large
  • Component/Button/Typography/tmp-default-label
  • Typography/Family/Sans Serif
  • Typography/Family/Serif
  • Typography/Kerning/Default
  • Typography/Kerning/Loose
  • Typography/Kerning/Tight
  • Typography/Line Heights/16
  • Typography/Line Heights/20
  • Typography/Line Heights/24
  • Typography/Line Heights/28
  • Typography/Line Heights/40
  • Typography/Line Heights/48
  • Typography/Line Heights/64
  • Typography/Line Heights/76
  • Typography/Line Heights/82
  • Typography/Line Heights/96
  • Typography/Line Heights/115
  • Typography/Line Heights/120
  • Typography/Line Heights/153
  • Typography/Line Heights/192
  • Typography/Sizes/12
  • Typography/Sizes/14
  • Typography/Sizes/20
  • Typography/Sizes/24
  • Typography/Sizes/32
  • Typography/Sizes/40
  • Typography/Sizes/48
  • Typography/Sizes/64
  • Typography/Sizes/76
  • Typography/Sizes/96
  • Typography/Sizes/120
  • Typography/Sizes/144
  • Typography/Sizes/192
  • Typography/Sizes/240
  • Typography/Sizes/base
  • Typography/Weight/Body
  • Typography/Weight/Headline
  • Typography/Weight/Hero
  • Typography/Weight/Label
  • Typography/Weight/Subhead

backpack.light.json

  • Component/Button/Dimension/min-height-large
  • Component/Button/Dimension/min-weight-large
  • Component/Button/Typography/tmp-default-label
  • Typography/Family/Sans Serif
  • Typography/Family/Serif
  • Typography/Kerning/Default
  • Typography/Kerning/Loose
  • Typography/Kerning/Tight

And 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-pressed
  • Component/Button/Colour/text-destructive

backpack.light.json

  • Component/Button/Dimension/padding-horizontal-default
  • Component/Button/Dimension/padding-horizontal-large

Source

Copilot AI review requested due to automatic review settings July 16, 2026 18:23

Copilot AI 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.

Copilot can't review bot-authored pull requests automatically. A user with Copilot access can request a review manually.

@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor Author

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]>
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor Author

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]>
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor Author

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]>
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor Author

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]>
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor Author

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]>
@gert-janvercauteren Gert-Jan Vercauteren (gert-janvercauteren) added patch Patch production bug and removed major Breaking change labels Jul 17, 2026
Regenerated by tokens:build-css alongside the token sync changes.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor Author

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.

LGTM,
Line height tokens will be revisited and re-sync from Figma.
They are not in use at the moment.

@gert-janvercauteren
Gert-Jan Vercauteren (gert-janvercauteren) merged commit c7acde8 into main Jul 17, 2026
15 checks passed
@gert-janvercauteren
Gert-Jan Vercauteren (gert-janvercauteren) deleted the figma-token-sync/20260716182321-29523645254 branch July 17, 2026 03:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants