github vanilla-extract-css/vanilla-extract @vanilla-extract/css@1.8.0

latest releases: @vanilla-extract/vite-plugin@4.0.17, @vanilla-extract/webpack-plugin@2.3.14, @vanilla-extract/integration@7.1.10...
2 years ago

Minor Changes

  • #807 b0b3662 Thanks @mattcompiles! - Add createContainer API

    createContainer creates a single scoped container name for use with CSS Container Queries. This avoids potential naming collisions with other containers.

    import { style, createContainer } from '@vanilla-extract/css';
    
    export const sidebarContainer = createContainer();
    
    export const sidebar = style({
      containerName: sidebarContainer,
    });
    
    export const navigation = style({
      '@container': {
        [`${sidebarContainer} (min-width: 400px)`]: {
          display: 'flex',
        },
      },
    });
  • #807 b0b3662 Thanks @mattcompiles! - Add support for container queries via the new @container key.

    import { style } from '@vanilla-extract/css';
    
    export const myStyle = style({
      '@container': {
        '(min-width: 400px)': {
          display: 'flex',
        },
      },
    });

Don't miss a new vanilla-extract release

NewReleases is sending notifications on new releases.