You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(baukasten): add className prop support for custom style merging
Add className prop to multiple components allowing users to extend
or override styles using clsx for proper class merging:
- Alert: merge custom className with variant styles
- Badge: merge custom className with variant/size/outline styles
- Button: merge custom className with all button variants
- Hero: merge custom className with container styles
- Input: merge custom className with input styles
- StatusBar: merge custom className with item styles
- Table: merge custom className with all table sub-components
Also add Storybook examples demonstrating className merging capabilities.
* feat(baukasten): wrap generated CSS in @layer for easier style overriding
Add @layer baukasten wrapper around all component library CSS to ensure
lower specificity than consumer styles. This makes overriding styles
easier without requiring !important or complex selectors.
Changes:
- Add wrapInLayer Vite plugin to wrap vanilla-extract CSS output
- Wrap global styles in @layer in generate-css.ts and css-variables.ts
- CSS variables remain outside the layer (no cascade protection needed)
- Add documentation comments explaining the layer strategy
story: 'Custom classNames are properly merged with the built-in button styles using `clsx`. This allows you to extend or override specific styles without losing the base button functionality.',
0 commit comments