Repository navigation
[CLOV-CSS] Migrate bpk-component-breadcrumb to CSS custom properties - #4948
Conversation
Closes #4808 Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Visit https://backpack.github.io/storybook-prs/4948 to see this build running in a browser. |
There was a problem hiding this comment.
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
DarkModeStorybook story usingBpkDarkExampleWrapper.
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.
| /* 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 */ |
There was a problem hiding this comment.
Fixed — pushed in commit 3dfb724 (verically -> vertically, it's -> its).
| /* gap: typography line-height */ | ||
| $icon-height: math.div(tokens.$bpk-line-height-xs, 2); |
There was a problem hiding this comment.
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.
|
Visit https://backpack.github.io/storybook-prs/4948 to see this build running in a browser. |
|
Visit https://backpack.github.io/storybook-prs/4948 to see this build running in a browser. |
|
Visit https://backpack.github.io/storybook-prs/4948 to see this build running in a browser. |
|
Token value audit — verified every new CSS var introduced in this PR against
All new/old values match — no visual regression risk from this migration. |
Closes #4808
Migrates bpk-component-breadcrumb SCSS to CSS custom properties with SASS fallbacks for light/dark mode support.
Changes
BpkBreadcrumbItem.module.scss: Replacetokens.$bpk-text-secondary-dayandtokens.$bpk-text-disabled-daywithvar()declarations using SASS tokens as fallbacksBpkBreadcrumb.stories.tsx: AddDarkModestory variant usingBpkDarkExampleWrapper