github vanilla-extract-css/vanilla-extract @vanilla-extract/css@1.11.0

latest releases: @vanilla-extract/vite-plugin@4.0.15, @vanilla-extract/integration@7.1.9, @vanilla-extract/rollup-plugin@1.3.9...
18 months ago

Minor Changes

  • #955 ece5fc3 Thanks @mrm007! - Add support for cascade layers, i.e. @layer.

    Create a scoped layer to avoid naming collisions, or with an explicit name using globalLayer. Styles can then be assigned to layers using the @layer key within your style definition.

    // layers.css.ts
    import { layer } from '@vanilla-extract/css';
    
    export const reset = layer('reset');
    export const framework = layer('framework');
    export const typography = layer('typography');
    
    // typography.css.ts
    import { style } from '@vanilla-extract/css';
    import { typography } from './layers.css';
    
    export const standard = style({
      '@layer': {
        [typography]: {
          fontSize: '1rem',
        },
      },
    });

Don't miss a new vanilla-extract release

NewReleases is sending notifications on new releases.