Repository navigation
[CLOV-CSS] Migrate bpk-component-content-cards to CSS custom properties - #4942
Conversation
- border-radius: var(--bpk-radius-md, tokens.$bpk-border-radius-md) - color: var(--bpk-text-secondary, tokens.$bpk-text-secondary-day) - Added comment for tokens.$bpk-one-pixel-rem usage (no CSS var equivalent) - Added VisualTestThreeCardsDark story using BpkDarkExampleWrapper Closes #4825 Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
c85d5c1 to
7032a2e
Compare
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-content-cards styling toward CSS custom properties (with SASS token fallbacks) and adds a dark-mode Storybook visual test story.
Changes:
- Updated
BpkContentCardSCSS to use CSS custom properties for radius + secondary text color with token fallbacks. - Added a dark-mode visual regression story via
BpkDarkExampleWrapper. - Added an inline comment documenting pixel-precise sizing usage for
tokens.$bpk-one-pixel-rem.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/backpack-web/src/bpk-component-content-cards/src/BpkContentCards.stories.tsx | Adds dark-mode visual test story and updates story content strings. |
| packages/backpack-web/src/bpk-component-content-cards/src/BpkContentCard.module.scss | Switches radius/text color to CSS custom properties with SASS fallbacks; documents sizing token usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { BpkDarkExampleWrapper } from 'bpk-storybook-utils'; | ||
|
|
There was a problem hiding this comment.
Outdated — this comment refers to a file/section that's no longer part of the current diff (superseded by a later commit on this branch). No action needed here.
| description: | ||
| 'Greece gave us the Gyros. A vessel of bread lifting chips from plate to mouth. It doesn\'t get godlier than this.', | ||
| "Greece gave us the Gyros. A vessel of bread lifting chips from plate to mouth. It doesn't get godlier than this.", | ||
| href: 'https://www.skyscanner.net', |
There was a problem hiding this comment.
Outdated — this comment refers to a file/section that's no longer part of the current diff (superseded by a later commit on this branch). No action needed here.
| description: | ||
| 'There are islands for everything. You can party, relax, chill, eat and hike, and that\'s just Santorini.', | ||
| "There are islands for everything. You can party, relax, chill, eat and hike, and that's just Santorini.", | ||
| href: 'https://www.skyscanner.net', |
There was a problem hiding this comment.
Outdated — this comment refers to a file/section that's no longer part of the current diff (superseded by a later commit on this branch). No action needed here.
|
Visit https://backpack.github.io/storybook-prs/4942 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 #4825
Migrates
bpk-component-content-cardsSCSS to CSS custom properties with SASS fallbacks for light/dark mode support.Changes
BpkContentCard.module.scss: Migrated twoborder-radiusdeclarations tovar(--bpk-radius-md, tokens.$bpk-border-radius-md)and description text colour tovar(--bpk-text-secondary, tokens.$bpk-text-secondary-day). Added a comment explainingtokens.$bpk-one-pixel-rempixel-precise sizing usage (no CSS var equivalent).BpkContentCards.stories.tsx: AddedVisualTestThreeCardsDarkstory usingBpkDarkExampleWrapperfor dark mode visual testing.