Skip to content

Commit

Permalink
vanilla-extract: Upgrade Vanilla Extract peer dep
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltaranto committed Nov 14, 2023
1 parent 3cd638e commit 1aa043f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .changeset/sour-files-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@capsizecss/vanilla-extract': major
---

Drop support for Vanilla Extract below v1.4

Upgrading to use Vanilla Extract's new style composition API in favour of the long time deprecated `composeStyles` function.
There is no API change for Capsize consumers, but this change will require a peer dependency of `[email protected]` or greater.
2 changes: 1 addition & 1 deletion packages/vanilla-extract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@capsizecss/core": "^3.0.0"
},
"peerDependencies": {
"@vanilla-extract/css": "^1.2.1"
"@vanilla-extract/css": "^1.4.0"
},
"devDependencies": {
"@vanilla-extract/css": "^1.9.2"
Expand Down
9 changes: 2 additions & 7 deletions packages/vanilla-extract/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
style,
assignVars,
composeStyles,
StyleRule,
} from '@vanilla-extract/css';
import { style, assignVars, StyleRule } from '@vanilla-extract/css';
import { precomputeValues } from '@capsizecss/core';

import { ComputedValues, CreateStyleObjectParameters } from './types';
Expand Down Expand Up @@ -39,7 +34,7 @@ const createVanillaStyle = ({
vars['@media'] = mqs;
}

return composeStyles(capsizeStyle, style(vars, debugId));
return style([capsizeStyle, style(vars, debugId)]);
};

function createTextStyle(
Expand Down

0 comments on commit 1aa043f

Please sign in to comment.