Skip to content

Commit

Permalink
Add arbitrary value support for transition-property (#5481)
Browse files Browse the repository at this point in the history
Co-Authored-By: Eric F. <[email protected]>

Co-authored-by: Eric F. <[email protected]>
  • Loading branch information
adamwathan and ericbf committed Sep 12, 2021
1 parent bbdda85 commit b16eb20
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/corePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,7 @@ export let transitionProperty = ({ matchUtilities, theme }) => {
}
},
},
{ values: theme('transitionProperty'), type: 'lookup' }
{ values: theme('transitionProperty'), type: 'any' }
)
}

Expand Down
5 changes: 5 additions & 0 deletions tests/arbitrary-values.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,11 @@
--tw-backdrop-sepia: sepia(0.38);
backdrop-filter: var(--tw-backdrop-filter);
}
.transition-\[opacity\2c width\] {
transition-property: opacity, width;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
}
.delay-\[var\(--delay\)\] {
transition-delay: var(--delay);
}
Expand Down
1 change: 1 addition & 0 deletions tests/arbitrary-values.test.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<div class="text-[length:var(--font-size)]"></div>
<div class="text-[color:var(--color)]"></div>
<div class="text-[angle:var(--angle)]"></div>
<div class="transition-[opacity,width]"></div>
<div class="duration-[2s]"></div>
<div class="m-[7px]"></div>
<div class="mx-[7px]"></div>
Expand Down

0 comments on commit b16eb20

Please sign in to comment.