-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicit duration for <transition> #4371
Comments
My 2 cents An alternative to: <transition name="complex-animation" duration-enter="1.5" duration-leave="2"> could be <transition name="complex-animation" duration="{enter: 1.5, leave: 2 }">
<transition name="complex-animation" duration="{enter: '1500ms', leave: '2s' }"> |
This would be great too for sub elements that might have a transition delay on them. My preference would be something flexible like @posva suggested, so we have a little more (or full) control over the steps. |
@Akryum your example implies that there's a bug in the |
No, the problem is nested transitions not being detected. I don't think it's a bug. |
Okay I see now. Animations have |
Perhaps a hack would be to transition a non-changing property separately over .modal-enter-active {
transition: opacity .3s, color .45s; // assuming color doesn't change
.modal-dialog {
transition: opacity .3s .15s, transform .3s .15s;
}
} |
It's what I currently do, but it's still a hack. |
Certainly |
* Add transition explicit duration * Fix tests for explicit transition duration * Tweaks & default to milliseconds * Better tests * Better test for change value case * Fix transition duration tests * Better flow typing * Fix transition test * Revert "Fix transition test" This reverts commit db75b3801ed11182119c78ebae87f40a62803714. * Fix transition test Revert "Fix transition test" This reverts commit db75b3801ed11182119c78ebae87f40a62803714. Fix transition test * Better flow types * Warn message * Better prop handling * Better flow typings * adjustments
Closed via #4857 |
Proposed change
Add the option to pass the total transition duration in seconds wia a new prop:
What does it solves?
Here is an example transition that demonstrate that the duration automatically detected by Vue can be wrong because of nested css transitions with different durations or delays:
Here the transition should last .45 s, but Vue only detect the first transition duration .3s for the enter part.
The text was updated successfully, but these errors were encountered: