Re: [csswg-drafts] [css-transforms-1] [css-transitions-1] Strange behavior with `insertBefore` vs `appendChild` and transitions (#5334)

In case it was missed, the code snippets are literally just following the FLIP pattern minus the last step of removing the transition class after the transition completes. Here's some pseudocode for what each element is doing:

const initial = elem.getBoundingClientRect().top
const final = elem.getBoundingClientRect().top"transition-duration", "0s")"transform", `translateY(${dx}px)`)
elem.classList.add("transition") // contains `transition: 2s transform`"transition-duration")"transform")

The glitches seem to involve the starting point for the `transform`, as if `dx` isn't accurate somehow. And the only thing that's different between the two code snippets is how `moveElement` is performed.

GitHub Notification of comment by isiahmeadows
Please view or discuss this issue at using your GitHub account

Received on Monday, 20 July 2020 16:40:52 UTC