sveltejs / svelte

Cybernetically enhanced web apps
https://svelte.dev
MIT License
78.18k stars 4.08k forks source link

Restart css animations after hydration in dev mode #8194

Open rodshtein opened 1 year ago

rodshtein commented 1 year ago

Describe the bug

There was a closer issue, but I can't find it.

Reproduction

The issue can be reproduced only in a specified elements order. If change the elements order, the issue will solved.

issue order

<svelte:head/>   
<Comp />
<div />  ← css animation

no issue orders

<svelte:head/>   
<div />
<Comp />

~or~

<Comp />
<div />
<svelte:head/>

Or without <Comp /> or <svelte:head/>

Stackblitz reproduction

Severity

annoyance

Rich-Harris commented 1 year ago

Transferred to sveltejs/svelte

jcsmithf22 commented 1 year ago

Will moving svelte:head to the end of the file affect performance? I am using partytown for google analytics and am trying to retain as much performance as possible.