Subscribe on changes!

`<Transition>`: More weird behavior

avatar
Jul 31st 2022

Vue version

3.2.37

Link to minimal reproduction

Vue Playground

Steps to reproduce

  • Go to the first playground example of the Transition Guide
  • Try using transform: translateY(100px) or transform: scale(2) translateY(100px) as .v-enter-from, .v-leave-to

What is expected?

The element should smoothly move down in a straight line (and scale, if that is used) and stay visible at the end of the animation

What is actually happening?

These odd behaviors all occur when using a single transform: translateY(100px) as .v-enter-from, .v-leave-to

  • Inline elements not animating (span)
  • Element abruptly disappearing at the end of animation
  • (This one occurs when chaining transforms transform: scale(2) translateY(100px)) Element veers to the left to varying degrees (seemingly by changing display CSS property of container element)

Demo

Vue playground Transform demo.webm

System Info

MacOS 11.6
Chrome: Version 103.0.5060.134 (Official Build) (x86_64)

Any additional comments?

Really wish this would work

avatar
Aug 1st 2022

<span v-if="show" style='position: absolute'>

avatar
Aug 1st 2022

The Component works fine, the behavior is the logics of transform

avatar
Aug 23rd 2022

Firstly, you cannot translate an inline-element

Secondly taking away the body element styling does not affect the animation when I tried it.

avatar
Aug 26th 2022

Thanks for all the feedback!

I learned much about transform.


The issue of <span> not wanting to move has been answered for me :). (see links in @sadeghbarati's answer)

Still ot sure about the veering to the left or the disappearing at the end of the animation. 🤔

avatar
Dec 15th 2023

this is the expected behavior.