Releases: vanilla-extract-css/vanilla-extract
@vanilla-extract/css@1.4.1
Patch Changes
- #343
50bae14
Thanks @mattcompiles! - Cleanup adapter after processing styles
@vanilla-extract/sprinkles@1.1.3
Patch Changes
- #331
30f3ba3
Thanks @markdalgleish! -createMapValueFn
: Support mapping values toboolean
,null
andundefined
@vanilla-extract/vite-plugin@2.0.1
Patch Changes
- #327
73b55f8
Thanks @benjervis! - Fix bug where precompiled .css.ts files (.css.js) were treated differently in SSR mode.
@vanilla-extract/sprinkles@1.1.2
Patch Changes
- #326
2d9b4c3
Thanks @mattcompiles! - Avoid callingcomposeStyles
when using the atoms function at runtime
@vanilla-extract/css@1.4.0
Minor Changes
-
#326
2d9b4c3
Thanks @mattcompiles! - Support passing arrays of styles tostyle
andstyleVariants
Multiple styles can now be composed into a single rule by providing an array of styles.
import { style } from '@vanilla-extract/css'; const base = style({ padding: 12 }); export const primary = style([base, { background: 'blue' }]); export const secondary = style([base, { background: 'aqua' }]);
When composed styles are used in selectors, they are assigned an additional class if required 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 } from '@vanilla-extract/css'; const background = style({ background: 'mintcream' }); const padding = style({ padding: 12 }); export const container = style([background, padding]); globalStyle(`${container} *`, { boxSizing: 'border-box', });
This feature is a replacement for the standalone
composeStyles
function which is now marked as deprecated. You can usestyle
with an array as a drop-in replacement.-export const container = composeStyles(background, padding); +export const container = style([background, padding]);
@vanilla-extract/webpack-plugin@2.0.0
Major Changes
-
#323
1e7d647
Thanks @mattcompiles! - Formatting of identifiers (e.g. class names, keyframes, CSS Vars, etc) can now be configured via theidentifiers
option which accepts eithershort
ordebug
.short
identifiers are a 7+ character hash. e.g.hnw5tz3
debug
identifiers contain human readable prefixes representing the owning filename and a potential rule level debug name. e.g.somefile_mystyle_hnw5tz3
import { vanillaExtractPlugin } from '@vanilla-extract/webpack-plugin'; vanillaExtractPlugin({ identifiers: 'short' });
BREAKING CHANGE
Previously identifiers were formatted as
short
whenprocess.env.NODE_ENV
was set to "production". By default, they will now be formatted according to webpack's mode config.
Patch Changes
- Updated dependencies [
1e7d647
]:- @vanilla-extract/integration@1.2.0
@vanilla-extract/vite-plugin@2.0.0
Major Changes
-
#323
1e7d647
Thanks @mattcompiles! - Formatting of identifiers (e.g. class names, keyframes, CSS Vars, etc) can now be configured via theidentifiers
option which accepts eithershort
ordebug
.short
identifiers are a 7+ character hash. e.g.hnw5tz3
debug
identifiers contain human readable prefixes representing the owning filename and a potential rule level debug name. e.g.somefile_mystyle_hnw5tz3
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'; vanillaExtractPlugin({ identifiers: 'short' });
BREAKING CHANGE
Previously identifiers were formatted as
short
whenprocess.env.NODE_ENV
was set to "production". By default, they will now be formatted according to Vite's mode config.
Patch Changes
- Updated dependencies [
1e7d647
]:- @vanilla-extract/integration@1.2.0
@vanilla-extract/snowpack-plugin@2.0.0
Major Changes
-
#323
1e7d647
Thanks @mattcompiles! - Formatting of identifiers (e.g. class names, keyframes, CSS Vars, etc) can now be configured via theidentifiers
option which accepts eithershort
ordebug
.short
identifiers are a 7+ character hash. e.g.hnw5tz3
debug
identifiers contain human readable prefixes representing the owning filename and a potential rule level debug name. e.g.somefile_mystyle_hnw5tz3
import { vanillaExtractPlugin } from '@vanilla-extract/snowpack-plugin'; const snowpackConfig = { plugins: [['@vanilla-extract/snowpack-plugin', { identifiers: 'short' }]], };
BREAKING CHANGE
Previously identifiers were formatted as
short
whenprocess.env.NODE_ENV
was set to "production". By default, they will now be formatted according to Snowpacks's mode config.
Patch Changes
- Updated dependencies [
1e7d647
]:- @vanilla-extract/integration@1.2.0
@vanilla-extract/integration@1.2.0
Minor Changes
- #323
1e7d647
Thanks @mattcompiles! - Support configurable identifier types
Patch Changes
@vanilla-extract/esbuild-plugin@2.0.0
Major Changes
-
#323
1e7d647
Thanks @mattcompiles! - Formatting of identifiers (e.g. class names, keyframes, CSS Vars, etc) can now be configured via theidentifiers
option which accepts eithershort
ordebug
.short
identifiers are a 7+ character hash. e.g.hnw5tz3
debug
identifiers contain human readable prefixes representing the owning filename and a potential rule level debug name. e.g.somefile_mystyle_hnw5tz3
import { vanillaExtractPlugin } from '@vanilla-extract/esbuild-plugin'; vanillaExtractPlugin({ identifiers: 'short' });
BREAKING CHANGE
Previously identifiers were formatted as
short
whenprocess.env.NODE_ENV
was set to "production". By default, they will now be formatted according to esbuild's minify config.
Patch Changes
- Updated dependencies [
1e7d647
]:- @vanilla-extract/integration@1.2.0