Skip to content

Commit 42266ef

Browse files
add transition-behavior utilities
Co-authored-by: Luke Warlow <[email protected]>
1 parent cc8c069 commit 42266ef

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -1717,6 +1717,8 @@ exports[`getClassList 1`] = `
17171717
"transform-view",
17181718
"transition",
17191719
"transition-all",
1720+
"transition-allow-discrete",
1721+
"transition-behavior-normal",
17201722
"transition-colors",
17211723
"transition-none",
17221724
"transition-opacity",

packages/tailwindcss/src/utilities.test.ts

+13
Original file line numberDiff line numberDiff line change
@@ -10475,6 +10475,19 @@ test('transition', () => {
1047510475
).toEqual('')
1047610476
})
1047710477

10478+
test('transition-behavior', () => {
10479+
expect(run(['transition-allow-discrete', 'transition-behavior-normal'])).toMatchInlineSnapshot(`
10480+
".transition-allow-discrete {
10481+
transition-behavior: allow-discrete;
10482+
}
10483+
10484+
.transition-behavior-normal {
10485+
transition-behavior: normal;
10486+
}"
10487+
`)
10488+
expect(run(['-transition-allow-discrete', '-transition-behavior-normal'])).toEqual('')
10489+
})
10490+
1047810491
test('delay', () => {
1047910492
expect(run(['delay-123', 'delay-200', 'delay-[300ms]'])).toMatchInlineSnapshot(`
1048010493
".delay-123 {

packages/tailwindcss/src/utilities.ts

+3
Original file line numberDiff line numberDiff line change
@@ -3609,6 +3609,9 @@ export function createUtilities(theme: Theme) {
36093609
],
36103610
})
36113611

3612+
staticUtility('transition-allow-discrete', [['transition-behavior', 'allow-discrete']])
3613+
staticUtility('transition-behavior-normal', [['transition-behavior', 'normal']])
3614+
36123615
functionalUtility('delay', {
36133616
handleBareValue: ({ value }) => {
36143617
if (Number.isNaN(Number(value))) return null

0 commit comments

Comments
 (0)