Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .changeset/tender-beans-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'@vanilla-extract/css': minor
---

`style`: Add support for `@starting-style` rules

**EXAMPLE USAGE**:

```ts
import { style } from '@vanilla-extact/css';
export const styleWithStartingStyle = style({
backgroundColor: 'black',
'@starting-style': {
backgroundColor: 'white',
},
});
``
7 changes: 7 additions & 0 deletions fixtures/features/src/features.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,10 @@ export const styleVariantsCompositionInSelector = styleVariants({
globalStyle(`body ${styleVariantsCompositionInSelector.variant}`, {
fontSize: '24px',
});

export const styleWithStartingStyle = style({
backgroundColor: 'black',
'@starting-style': {
backgroundColor: 'white',
},
});
1 change: 1 addition & 0 deletions fixtures/features/src/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default `
<div id="${testNodes.compositionOnly}" class="${styles.compositionOnly}">Composition only</div>
<div id="${testNodes.styleCompositionInSelector}" class="${styles.styleCompositionInSelector}">Style composition in selector</div>
<div id="${testNodes.styleVariantsCompositionInSelector}" class="${styles.styleVariantsCompositionInSelector.variant}">Style variants composition in selector</div>
<div id="${testNodes.styleWithStartingStyle}" class="${styles.styleWithStartingStyle}">Style with @starting-style rule</div>
`;

// @ts-expect-error Vite env not defined
Expand Down
3 changes: 2 additions & 1 deletion fixtures/features/test-nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"styleVariantsWithMappedComposition": "styleVariantsWithMappedComposition",
"compositionOnly": "compositionOnly",
"styleCompositionInSelector": "styleCompositionInSelector",
"styleVariantsCompositionInSelector": "styleVariantsCompositionInSelector"
"styleVariantsCompositionInSelector": "styleVariantsCompositionInSelector",
"styleWithStartingStyle": "styleWithStartingStyle"
}
Loading