any reason why transition property is not atomic? #13924
-
When using
But then, if I use Any reason |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
I assume so that it lets you only need to add
What differences do you get that is not to your expectations? |
Beta Was this translation helpful? Give feedback.
-
I sometimes don't get the duration or timing function that I specify (I get
the one defined in the transition-all)
…On Sun, Jun 30, 2024, 10:16 Justin Wong ***@***.***> wrote:
Any reason transition-all is not just setting the property?
I assume so that it lets you only need to add transition-all class to
have transitions play.
But then, if I use transition-all duration-1000 ease-in I might not get
the results I expect (since the duration and timing-function are defined
twice).
What differences do you get that is not to your expectations?
—
Reply to this email directly, view it on GitHub
<#13924 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZSBASAP7Y3L3AM5LB3DTLZJ6WDHAVCNFSM6AAAAABKD3E3JOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TSMJVGM3TS>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Like @wongjn mentioned, we do this so you can add a transition with a single utility instead of always having to add three classes, and let you override the timing function and duration with other utilities as necessary. There are a number of utilities in Tailwind that do this sort of thing, for example font size utilities like Two options for your particular situation:
Hope that helps! |
Beta Was this translation helpful? Give feedback.
Like @wongjn mentioned, we do this so you can add a transition with a single utility instead of always having to add three classes, and let you override the timing function and duration with other utilities as necessary.
There are a number of utilities in Tailwind that do this sort of thing, for example font size utilities like
text-xl
also set aline-height
value, and theborder
utility effectively sets aborder-style
and aborder-width
so you don't have to writeborder border-solid
to get a border.Two options for your particular situation:
Remove the defaults for
transition-timing-function
andtransition-duration
in your theme: