Skip to content

Releases: vanilla-extract-css/vanilla-extract

@vanilla-extract/[email protected]

03 Oct 23:55
d34d1f6

Choose a tag to compare

Patch Changes

@vanilla-extract/[email protected]

30 Sep 01:17
1cddaa2

Choose a tag to compare

Patch Changes

@vanilla-extract/[email protected]

28 Sep 02:45
a9b7905

Choose a tag to compare

Patch Changes

  • #389 23d2757 Thanks @aulneau! - This update adds mjs to the file *.css.* regex, enabling better support for ESM packages/files.

@vanilla-extract/[email protected]

27 Sep 12:37
0222a80

Choose a tag to compare

Patch Changes

@vanilla-extract/[email protected]

26 Sep 23:30
f9f8ac4

Choose a tag to compare

Minor Changes

  • #376 f8082b9 Thanks @TheMightyPenguin! - Add RecipeVariants type

    A utility to make use of the recipe’s type interface. This can be useful when typing functions or component props that need to accept recipe values as part of their interface.

    // button.css.ts
    import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
    
    export const button = recipe({
      variants: {
        color: {
          neutral: { background: 'whitesmoke' },
          brand: { background: 'blueviolet' },
          accent: { background: 'slateblue' },
        },
        size: {
          small: { padding: 12 },
          medium: { padding: 16 },
          large: { padding: 24 },
        },
      },
    });
    
    // Get the type
    export type ButtonVariants = RecipeVariants<typeof button>;
    
    // the above will result in a type equivalent to:
    export type ButtonVariants = {
      color?: 'neutral' | 'brand' | 'accent';
      size?: 'small' | 'medium' | 'large';
    };

@vanilla-extract/[email protected]

24 Sep 09:30
ac09b5d

Choose a tag to compare

Patch Changes

@vanilla-extract/[email protected]

21 Sep 00:17
0ac48dd

Choose a tag to compare

Minor Changes

  • #373 a55d2cf Thanks @mattcompiles! - Add devStyleRuntime option to allow switching between dev style runtimes

    The built-in Vite dev style runtime (what adds styles to the page when running vite serve) doesn't seem to clean up old styles as expected. Passing devStyleRuntime: 'vanilla-extract' will instead use vanilla-extract's browser runtime. This pushes all style creation in development to the browser, but may give a better HMR experience.

@vanilla-extract/[email protected]

18 Sep 07:05
6751ccc

Choose a tag to compare

Minor Changes

  • #360 4ceb76e Thanks @michaeltaranto! - Clean up public API, deprecating old API names. Also adding sprinkles to the docs site and using sprinkles in favour of atoms for the canoncial examples.

    API changes include:

    • Rename createAtomicStyles to defineProperties, createAtomicStyles is now deprecated
    • Rename createAtomsFn to createSprinkles, createAtomsFn is now deprecated
    • Rename AtomicStyles type to SprinklesProperties, AtomicStyles is now deprecated

    Migration Guide

    -import { createAtomicStyles, createAtomsFn } from '@vanilla-extract/sprinkles';
    +import { defineProperties, createSprinkles } from '@vanilla-extract/sprinkles';
    
    -const responsiveProperties = createAtomicStyles({
    +const responsiveProperties = defineProperties({
      conditions: {
        mobile: {},
        tablet: { '@media': 'screen and (min-width: 768px)' },
        desktop: { '@media': 'screen and (min-width: 1024px)' }
      },
      defaultCondition: 'mobile',
      properties: {
        display: ['none', 'block', 'flex'],
        flexDirection: ['row', 'column'],
        padding: space
        // etc.
      }
    });
    
    -export const sprinkles = createAtomsFn(responsiveProperties);
    +export const sprinkles = createSprinkles(responsiveProperties);

@vanilla-extract/[email protected]

15 Sep 12:46
b8c8be1

Choose a tag to compare

Minor Changes

  • #361 531044b Thanks @markdalgleish! - Automatically add quotes to content values when necessary

    For example { content: '' } will now return CSS of { content: "" }

@vanilla-extract/[email protected]

13 Sep 03:47
70e802f

Choose a tag to compare

Patch Changes

  • #354 cdad52d Thanks @mattcompiles! - Fix function serialization with older versions of the @vanilla-extract/integration package