[CLOV-CSS] Migrate bpk-component-page-indicator to CSS custom properties - #4945
Conversation
Replaces bare SASS tokens with CSS var() + SASS fallback pattern: - \$bpk-line-day → var(--bpk-other-line-default, ...) - \$bpk-line-on-dark-day → var(--bpk-other-line-on-contrast, ...) - \$bpk-text-secondary-day → var(--bpk-text-secondary, ...) - \$bpk-text-on-dark-day → var(--bpk-text-on-dark, ...) - \$bpk-text-primary-day → var(--bpk-text-primary, ...) Adds OnDark story using BpkDarkExampleWrapper. Closes #4831 Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Replaces bare SASS tokens with CSS var() + SASS fallback pattern: - \$bpk-line-day → var(--bpk-other-line-default, ...) - \$bpk-line-on-dark-day → var(--bpk-other-line-on-contrast, ...) - \$bpk-text-secondary-day → var(--bpk-text-secondary, ...) - \$bpk-text-on-dark-day → var(--bpk-text-on-dark, ...) - \$bpk-text-primary-day → var(--bpk-text-primary, ...) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
React19 TypeScript migration requires explicit suppression for untyped bpk-storybook-utils imports.
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-page-indicator styling from pure SCSS tokens to CSS custom properties (with SASS fallbacks) to enable theme responsiveness, and adds a Storybook dark-mode example.
Changes:
- Updated page indicator dot and active dot colors to use CSS custom properties with token fallbacks.
- Migrated carousel nav button text color to a CSS custom property.
- Added an
OnDarkStorybook story wrapped inBpkDarkExampleWrapper.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/backpack-web/src/bpk-component-page-indicator/src/BpkPageIndicator.stories.tsx | Adds dark-mode Storybook example and minor formatting cleanups. |
| packages/backpack-web/src/bpk-component-page-indicator/src/BpkPageIndicator.module.scss | Replaces hardcoded token colors with CSS custom properties + SASS fallbacks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Visit https://backpack.github.io/storybook-prs/4945 to see this build running in a browser. |
|
Visit https://backpack.github.io/storybook-prs/4945 to see this build running in a browser. |
Swap global semantic var references for the new component-scoped --bpk-private-page-indicator-* vars, keeping SASS token fallbacks.
|
Visit https://backpack.github.io/storybook-prs/4945 to see this build running in a browser. |
|
Token value audit — CORRECTED (see note below)
Re-verified against the current
All 5 CSS vars exist and all values match their SASS fallbacks exactly, light and dark. No mismatches found. This PR's token migration is clean — no blocking issues from this audit. |
Summary
bpk-component-page-indicatorSCSS to CSS custom properties with SASS fallbacksOnDarkStorybook story usingBpkDarkExampleWrapperCloses #4831
🤖 Generated with Claude Code