Skip to content

Commit

Permalink
Add duration-initial and ease-initial utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Sep 23, 2024
1 parent e49c662 commit d7db75f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1908,6 +1908,8 @@ exports[`getClassList 1`] = `
"duration-500",
"duration-700",
"duration-75",
"duration-initial",
"ease-initial",
"end-0.5",
"end-1",
"end-3",
Expand Down
6 changes: 6 additions & 0 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3760,6 +3760,9 @@ export function createUtilities(theme: Theme) {
let transitionDurationProperty = () => {
return atRoot([property('--tw-duration')])
}

staticUtility('duration-initial', [transitionDurationProperty, ['--tw-duration', 'initial']])

utilities.functional('duration', (candidate) => {
// This utility doesn't support negative values.
if (candidate.negative) return
Expand Down Expand Up @@ -3816,6 +3819,9 @@ export function createUtilities(theme: Theme) {
let transitionTimingFunctionProperty = () => {
return atRoot([property('--tw-ease')])
}

staticUtility('ease-initial', [transitionTimingFunctionProperty, ['--tw-ease', 'initial']])

functionalUtility('ease', {
themeKeys: ['--transition-timing-function'],
handle: (value) => [
Expand Down

0 comments on commit d7db75f

Please sign in to comment.