Skip to content

Jerky behavior when using crossfade on text nodes #8310

@rzp-goutam

Description

@rzp-goutam

Describe the bug

My understanding is crossfade transition is to allow two elements to gracefully enter/exit the viewport. However, that's not what happens when I'm using crossfade on text nodes.

This is the how the transition now looks like:

Screen.Recording.2023-02-22.at.3.13.03.PM.mov

I feel this experience is janky..the text is abruptly moving back to initial position.

A better experience would be to just fade out one element and fade in the other one. Using fade:in, fade:out had similar affect (they caused a jank in the screen)

Reproduction

https://svelte.dev/repl/33f6e8f2a3864b7b85d59d797f4013b9?version=3.50.1

Logs

No response

System Info

Svelte version: 3.50.1

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions