What problem does it solve?
Backpack components hardcode light-mode values via static SASS tokens, so they cannot respond to the light/dark theme system defined in the new CSS custom property files. This Skill guides the full migration of a component's SCSS mixin to var() declarations with SASS fallbacks, including the surrounding theme wiring.
Core Features & Use Cases
- SCSS Mixin Migration: Replace bare
tokens.$bpk-*-day values and bpk-themeable-property calls with var(--bpk-*, sass-fallback) declarations for colours, spacing, radii, borders, and typography.
- Theme Wiring Updates: Update
themeAttributes.tsx to expose only --bpk-private-{component}-* keys, refresh themed stories, and fix themeAttributes-test.tsx assertions.
- RTL Modernization: Convert physical properties plus
bpk-rtl mixins into CSS logical properties like inset-inline-end.
- Use Case: Migrating the Badge component so its background and text colours flip automatically between
theme-backpack-light.css and theme-backpack-dark.css, while BpkThemeProvider overrides still work via the new private var names.
Quick Start
Migrate the Backpack badge component's SCSS mixin to CSS custom properties with SASS fallbacks and update its themeAttributes, stories, and tests.