github vanilla-extract-css/vanilla-extract @vanilla-extract/snowpack-plugin@1.1.0

latest releases: @vanilla-extract/integration@7.1.4, @vanilla-extract/vite-plugin@4.0.9, @vanilla-extract/webpack-plugin@2.3.8...
2 years ago

Minor Changes

  • #259 b8a6441 Thanks @markdalgleish! - Allow the result of composeStyles to be used in selectors

    When style compositions are used in selectors, they are now assigned an additional class so they can be uniquely identified. When selectors are processed internally, the composed classes are removed, only leaving behind the unique identifier classes. This allows you to treat them as if they were a single class within vanilla-extract selectors.

    import { style, globalStyle, composeStyles } from '@vanilla-extract/css';
    
    const background = style({ background: 'mintcream' });
    const padding = style({ padding: 12 });
    
    export const container = composeStyles(background, padding);
    
    globalStyle(`${container} *`, {
      boxSizing: 'border-box',
    });

Patch Changes

  • Updated dependencies [b8a6441]:
    • @vanilla-extract/integration@1.1.0

Don't miss a new vanilla-extract release

NewReleases is sending notifications on new releases.