Post

Did anyone say Retargetable View Transitions (aka Interruptible View Transitions)? I think I’ve got it working (by throwing some extra JavaScript at it) …

I (partially) recreate the VT animations in the real DOM (on hidden elements). Upon interruption of the active View Transition I read the mid-flight values from those copies, which I then use as the starting point for the next VT.

0 reposts1 like

Oh ok, interesting, how much of the VT animation do you actually have to manually write? Can you read/copy the final computed values of a VT animation and feed that to the DOM animations?

Since I have a hunch you want to know the finer details: the reason I get the positions from _real_ elements is because the values in the keyframes (which are used on the pseudos) are in a different coordinate space: the "Snapshot Containing Block". brm.us/snapshot-con... has all info.

brm.usView Transitions Applied: Dealing with the Snapshot Containing BlockBeware when manipulating the coordinates of the View Transition’s ::view-transition-group(*) pseudo. Depending on where you read those coordinates from, you might end up with layout jumps when writing...