fix(youtube-gallery): remove crossfade flash on carousel navigation
Deploy / verify (push) Successful in 1m23s
Deploy / deploy (push) Successful in 1m45s

The carousel iframe row was wrapped in {#key currentIndex} with
transition:fade, so switching slides (or navigating to the page) faded
the old and new row in overlap — briefly showing two rows / a blink.
Drop the fade from both iframe containers, matching the modal variant
which uses {#key} without a transition.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Peter Meier
2026-07-07 22:48:10 +02:00
parent 84c41f80b1
commit 7379d5750c
@@ -280,7 +280,7 @@
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
{#key currentIndex}
{@const current = items[currentIndex]}
<div class="aspect-video w-full overflow-hidden rounded-xs bg-stein-100" transition:fade={{ duration: 150 }}>
<div class="aspect-video w-full overflow-hidden rounded-xs bg-stein-100">
<iframe
title={current.video.title ?? t(T.youtube_title_fallback)}
src={current.embedUrl}
@@ -291,7 +291,7 @@
></iframe>
</div>
{#if second}
<div class="hidden md:block aspect-video w-full overflow-hidden rounded-xs bg-stein-100" transition:fade={{ duration: 150 }}>
<div class="hidden md:block aspect-video w-full overflow-hidden rounded-xs bg-stein-100">
<iframe
title={second.video.title ?? t(T.youtube_title_fallback)}
src={second.embedUrl}