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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Bundle `@tailwindcss/forms`, `@tailwindcss/typography`, and `@tailwindcss/aspect-ratio` with the standalone CLI ([#15028](https://github.com/tailwindlabs/tailwindcss/pull/15028))
- Allow `addUtilities()` and `addComponents()` to work with child combinators and other complex selectors ([#15029](https://github.com/tailwindlabs/tailwindcss/pull/15029))
- Support colors that use `<alpha-value>` in JS configs and plugins ([#15033](https://github.com/tailwindlabs/tailwindcss/pull/15033))
- Add new `transition-discrete` and `transition-normal` utilities for `transition-behavior` ([#15051](https://github.com/tailwindlabs/tailwindcss/pull/15051))
- _Upgrade (experimental)_: Migrate `[&>*]` to the `*` variant ([#15022](https://github.com/tailwindlabs/tailwindcss/pull/15022))
- _Upgrade (experimental)_: Migrate `[&_*]` to the `**` variant ([#15022](https://github.com/tailwindlabs/tailwindcss/pull/15022))
- _Upgrade (experimental)_: Warn when trying to migrating a project that is not on Tailwind CSS v3 ([#15015](https://github.com/tailwindlabs/tailwindcss/pull/15015))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7176,7 +7176,9 @@ exports[`getClassList 1`] = `
"transition",
"transition-all",
"transition-colors",
"transition-discrete",
"transition-none",
"transition-normal",
"transition-opacity",
"transition-shadow",
"transition-transform",
Expand Down
1 change: 1 addition & 0 deletions packages/tailwindcss/src/property-order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ export default [
'backdrop-filter',

'transition-property',
'transition-behavior',
'transition-delay',
'transition-duration',
'transition-timing-function',
Expand Down
14 changes: 14 additions & 0 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14463,6 +14463,20 @@ test('transition', async () => {
).toEqual('')
})

test('transition-behavior', async () => {
expect(await run(['transition-discrete', 'transition-normal'])).toMatchInlineSnapshot(`
".transition-discrete {
transition-behavior: allow-discrete;
}

.transition-normal {
transition-behavior: normal;
}"
`)

expect(await run(['-transition-discrete', '-transition-normal'])).toEqual('')
})

test('delay', async () => {
expect(await run(['delay-123', 'delay-200', 'delay-[300ms]'])).toMatchInlineSnapshot(`
".delay-123 {
Expand Down
3 changes: 3 additions & 0 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3552,6 +3552,9 @@ export function createUtilities(theme: Theme) {
],
})

staticUtility('transition-discrete', [['transition-behavior', 'allow-discrete']])
staticUtility('transition-normal', [['transition-behavior', 'normal']])

functionalUtility('delay', {
handleBareValue: ({ value }) => {
if (!isPositiveInteger(value)) return null
Expand Down