Skip to content

Commit

Permalink
Add transition-behavior utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewarlow committed Oct 5, 2023
1 parent 614c7e2 commit 4498cad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/corePlugins.js
Expand Up @@ -2860,6 +2860,12 @@ export let corePlugins = {
)
},

transitionBehavior: ({ addUtilities }) => {
addUtilities({
'.transition-allow-discrete': { 'transition-behavior': 'allow-discrete' },
'.transition-behavior-normal': { 'transition-behavior': 'normal' },
})
},
transitionDelay: createUtilityPlugin('transitionDelay', [['delay', ['transitionDelay']]]),
transitionDuration: createUtilityPlugin(
'transitionDuration',
Expand Down
10 changes: 10 additions & 0 deletions tests/plugins/transitionBehavior.js
@@ -0,0 +1,10 @@
import { css, quickPluginTest } from '../util/run'

quickPluginTest('transitionBehavior').toMatchFormattedCss(css`
.transition-allow-discrete {
transition-behavior: allow-discrete;
}
.transition-behavior-normal {
transition-behavior: normal;
}
`)

0 comments on commit 4498cad

Please sign in to comment.