Skip to content

Commit de79455

Browse files
adamwathannix6839
andauthored
Add variant for @starting-style (#13329)
* Add variant for @starting-style Co-Authored-By: Han Yeong-woo <[email protected]> * Update changelog --------- Co-authored-by: Adam Wathan <[email protected]> Co-authored-by: Han Yeong-woo <[email protected]>
1 parent 3249777 commit de79455

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Make `rotate-x/y/z-*` utilities composable ([#13319](https://github.com/tailwindlabs/tailwindcss/pull/13319))
1313
- `@tailwind/vite` applies the Vite CSS plugin to transform Tailwind-generated CSS (e.g. inlining images) ([#13218](https://github.com/tailwindlabs/tailwindcss/pull/13218))
14+
- Add `starting` variant for `@starting-style` ([#13329](https://github.com/tailwindlabs/tailwindcss/pull/13329))
1415

1516
### Fixed
1617

packages/tailwindcss/src/__snapshots__/intellisense.test.ts.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2403,6 +2403,13 @@ exports[`getVariants 1`] = `
24032403
"selectors": [Function],
24042404
"values": [],
24052405
},
2406+
{
2407+
"hasDash": true,
2408+
"isArbitrary": false,
2409+
"name": "starting",
2410+
"selectors": [Function],
2411+
"values": [],
2412+
},
24062413
{
24072414
"hasDash": true,
24082415
"isArbitrary": false,

packages/tailwindcss/src/variants.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,16 @@ test('dark', () => {
801801
`)
802802
})
803803

804+
test('starting', () => {
805+
expect(run(['starting:opacity-0'])).toMatchInlineSnapshot(`
806+
"@starting-style {
807+
.starting\\:opacity-0 {
808+
opacity: 0;
809+
}
810+
}"
811+
`)
812+
})
813+
804814
test('print', () => {
805815
expect(run(['print:flex'])).toMatchInlineSnapshot(`
806816
"@media print {

packages/tailwindcss/src/variants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ export function createVariants(theme: Theme): Variants {
695695

696696
staticVariant('dark', ['@media (prefers-color-scheme: dark)'], { compounds: false })
697697

698+
staticVariant('starting', ['@starting-style'], { compounds: false })
699+
698700
staticVariant('print', ['@media print'], { compounds: false })
699701

700702
staticVariant('forced-colors', ['@media (forced-colors: active)'], { compounds: false })

0 commit comments

Comments
 (0)