Skip to content

Commit 14bba09

Browse files
authored
Version Packages (#329)
1 parent 2d9b4c3 commit 14bba09

File tree

13 files changed

+66
-73
lines changed

13 files changed

+66
-73
lines changed

.changeset/calm-pillows-jam.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

.changeset/five-weeks-do.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/webpack-react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"@babel/preset-react": "^7.13.13",
2424
"@babel/preset-typescript": "^7.13.0",
2525
"@vanilla-extract/babel-plugin": "^1.0.1",
26-
"@vanilla-extract/css": "1.3.0",
27-
"@vanilla-extract/sprinkles": "^1.1.1",
26+
"@vanilla-extract/css": "1.4.0",
27+
"@vanilla-extract/sprinkles": "^1.1.2",
2828
"@vanilla-extract/webpack-plugin": "^2.0.0",
2929
"babel-loader": "^8.2.2",
3030
"css-loader": "^5.2.4",

fixtures/features/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"author": "SEEK",
77
"private": true,
88
"dependencies": {
9-
"@vanilla-extract/css": "1.3.0",
9+
"@vanilla-extract/css": "1.4.0",
1010
"@vanilla-extract/dynamic": "2.0.0"
1111
}
1212
}

fixtures/low-level/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
"author": "SEEK",
66
"private": true,
77
"dependencies": {
8-
"@vanilla-extract/css": "1.3.0"
8+
"@vanilla-extract/css": "1.4.0"
99
}
1010
}

fixtures/sprinkles/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"author": "SEEK",
77
"private": true,
88
"dependencies": {
9-
"@vanilla-extract/css": "1.3.0",
10-
"@vanilla-extract/sprinkles": "1.1.1"
9+
"@vanilla-extract/css": "1.4.0",
10+
"@vanilla-extract/sprinkles": "1.1.2"
1111
}
1212
}

fixtures/themed/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"author": "SEEK",
77
"private": true,
88
"dependencies": {
9-
"@vanilla-extract/css": "1.3.0",
9+
"@vanilla-extract/css": "1.4.0",
1010
"@vanilla-extract/dynamic": "2.0.0"
1111
}
1212
}

fixtures/unused-modules/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"author": "SEEK",
99
"private": true,
1010
"dependencies": {
11-
"@vanilla-extract/css": "1.3.0"
11+
"@vanilla-extract/css": "1.4.0"
1212
}
1313
}

packages/css/CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# @vanilla-extract/css
22

3+
## 1.4.0
4+
5+
### Minor Changes
6+
7+
- [#326](https://github.com/seek-oss/vanilla-extract/pull/326) [`2d9b4c3`](https://github.com/seek-oss/vanilla-extract/commit/2d9b4c3e711310e55dbefe4b3430a771d95d62fd) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Support passing arrays of styles to `style` and `styleVariants`
8+
9+
Multiple styles can now be composed into a single rule by providing an array of styles.
10+
11+
```ts
12+
import { style } from '@vanilla-extract/css';
13+
14+
const base = style({ padding: 12 });
15+
16+
export const primary = style([base, { background: 'blue' }]);
17+
18+
export const secondary = style([base, { background: 'aqua' }]);
19+
```
20+
21+
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.
22+
23+
```ts
24+
import { style, globalStyle } from '@vanilla-extract/css';
25+
26+
const background = style({ background: 'mintcream' });
27+
const padding = style({ padding: 12 });
28+
29+
export const container = style([background, padding]);
30+
31+
globalStyle(`${container} *`, {
32+
boxSizing: 'border-box',
33+
});
34+
```
35+
36+
This feature is a replacement for the standalone `composeStyles` function which is now marked as deprecated. You can use `style` with an array as a drop-in replacement.
37+
38+
```diff
39+
-export const container = composeStyles(background, padding);
40+
+export const container = style([background, padding]);
41+
```
42+
343
## 1.3.0
444

545
### Minor Changes

packages/css/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vanilla-extract/css",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"description": "Zero-runtime Stylesheets-in-TypeScript",
55
"sideEffects": true,
66
"main": "dist/vanilla-extract-css.cjs.js",

0 commit comments

Comments
 (0)