question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Explicit duration for <transition>

See original GitHub issue

Proposed change

Add the option to pass the total transition duration in seconds wia a new prop:

<!-- Both enter and leave explicit total duration -->
<transition name="complex-animation" duration="1.5">
<!-- Specific enter and leave explicit total durations -->
<transition name="complex-animation" duration-enter="1.5" duration-leave="2">

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:

/* Modal */

.modal-enter-active {
  transition: opacity .3s;

  .modal-dialog {
    transition: opacity .3s .15s, transform .3s .15s;
  }
}

.modal-leave-active {
  transition: opacity .3s .15s;

  .modal-dialog {
    transition: opacity .3s, transform .3s;
  }
}

.modal-enter,
.modal-leave-active {
  opacity: 0;

  .modal-dialog {
    opacity: 0;
    transform: translateY(-40px);
  }
}

Here the transition should last .45 s, but Vue only detect the first transition duration .3s for the enter part.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

12reactions
posvacommented, Dec 2, 2016

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' }">
0reactions
yyx990803commented, Feb 15, 2017

Closed via #4857

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deep Explicit Duration Switching Models for Time Series
We propose the Recurrent Explicit Duration Switching Dynamical ... transition/emission distributions parameterized by neural networks [25, 19, 13, 30].
Read more >
Explicit-Duration Hidden Markov Model Inference of UP ...
Here we present an explicit-duration hidden Markov model (EDHMM) ... Alignment of state transition times to a new observation sequence can ...
Read more >
Appropriate Use of Explicit Transitions - Video Transcripts
Video Length: 2:10. Visual: Walden logo at bottom of screen along with notepad and pencil background. Audio: Guitar music.
Read more >
Inference in Explicit Duration Hidden Markov Models
Explicit Duration HMM / H. Semi-Markov Model. [Mitchell et al., 1995, Murphy, 2002, ... State transition structure can't go from infected to pre-infection....
Read more >
Using CSS transitions - CSS: Cascading Style Sheets | MDN
With CSS transitions enabled, changes occur at time intervals that ... you decide which properties to animate (by listing them explicitly), ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found