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

[CLOV-CSS] Migrate bpk-component-breadcrumb to CSS custom properties - #4948

Merged
Vincent Liu (xiaogliu) merged 4 commits into
mainfrom
migrate/css-vars-breadcrumb-4808
Jul 23, 2026
Merged

Vincent Liu (xiaogliu) merged 4 commits into
mainfrom
migrate/css-vars-breadcrumb-4808

Conversation

@gert-janvercauteren

Copy link
Copy Markdown
Contributor

Closes #4808

Migrates bpk-component-breadcrumb SCSS to CSS custom properties with SASS fallbacks for light/dark mode support.

Changes

  • BpkBreadcrumbItem.module.scss: Replace tokens.$bpk-text-secondary-day and tokens.$bpk-text-disabled-day with var() declarations using SASS tokens as fallbacks
  • BpkBreadcrumb.stories.tsx: Add DarkMode story variant using BpkDarkExampleWrapper

Copilot AI review requested due to automatic review settings July 22, 2026 08:39
@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

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.

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Migrates bpk-component-breadcrumb styling to CSS custom properties (with SASS token fallbacks) and adds a Storybook dark mode variant to validate light/dark theming.

Changes:

  • Updated breadcrumb item styles to use var(--...) with token fallbacks for text/fill colors.
  • Added a DarkMode Storybook story using BpkDarkExampleWrapper.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/backpack-web/src/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.scss Swaps hard-coded SASS color tokens for CSS custom properties with token fallbacks.
packages/backpack-web/src/bpk-component-breadcrumb/src/BpkBreadcrumb.stories.tsx Adds a dark-mode story wrapper to exercise the component under dark theme variables.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 23 to 25
/* After adding the wrapper around the icon, need to set the line
height to stop the 16x16 or 32x32(zoomed) icon from expanding
verically past it's 16 or 32 pixels height */

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.

Fixed — pushed in commit 3dfb724 (verically -> vertically, it's -> its).

Comment on lines 27 to 28
/* gap: typography line-height */
$icon-height: math.div(tokens.$bpk-line-height-xs, 2);

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.

This comment wording pre-dates this PR (the migration only added a blank line above it, didn't touch the text) — not introduced by this migration. Worth a follow-up cleanup if the team wants to reword it, but out of scope here.

@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

@skyscanner-backpack-bot

Copy link
Copy Markdown
Contributor

@xiaogliu

Copy link
Copy Markdown
Contributor

Token value audit — verified every new CSS var introduced in this PR against token-sync/css/theme-backpack-light.css / theme-backpack-dark.css and the original SASS token source (base.default.scss):

CSS var Old SASS fallback Light value Dark value Match
--bpk-text-secondary $bpk-text-secondary-day #626971 #bdc4cb ✅
--bpk-text-disabled $bpk-text-disabled-day rgba(0, 0, 0, 0.2) rgba(255, 255, 255, 0.2) ✅

All new/old values match — no visual regression risk from this migration.

@xiaogliu Vincent Liu (xiaogliu) 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.

LGTM

@xiaogliu
Vincent Liu (xiaogliu) merged commit 9fb27fe into main Jul 23, 2026
15 checks passed
@xiaogliu
Vincent Liu (xiaogliu) deleted the migrate/css-vars-breadcrumb-4808 branch July 23, 2026 08:59
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.

Migrate bpk-component-breadcrumb to CSS custom properties

3 participants