From 0727eccb7160389b437c6cf6965bd9fcb78f6047 Mon Sep 17 00:00:00 2001 From: Oleksandr Date: Tue, 17 Feb 2026 19:02:00 +0200 Subject: [PATCH] fix: layout jump on video loading --- src/components/marquee/MarqueeContent.astro | 27 ++++++++++++--------- src/styles/components/marquee.css | 18 ++++++++++---- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/src/components/marquee/MarqueeContent.astro b/src/components/marquee/MarqueeContent.astro index dcd544f..5634980 100644 --- a/src/components/marquee/MarqueeContent.astro +++ b/src/components/marquee/MarqueeContent.astro @@ -44,18 +44,21 @@ const videos = [ {videos.map(({ author, source, installable, path }, index) => { return (
- +
+ +

Configuration by {source && !installable && <>(source code)} diff --git a/src/styles/components/marquee.css b/src/styles/components/marquee.css index 8c09ba6..c654711 100644 --- a/src/styles/components/marquee.css +++ b/src/styles/components/marquee.css @@ -67,16 +67,28 @@ padding-inline: 0.5rem; box-sizing: border-box; will-change: opacity; + width: 100vw; + flex: 0 0 100vw; & > * { z-index: 11; } - & video { + & .video-wrapper { position: relative; + width: 100%; max-width: 75rem; + aspect-ratio: 16 / 9; box-shadow: var(--shadow-md); + background-color: hsl(var(--bg-700)); + overflow: hidden; + + & video { + width: 100%; + height: 100%; + object-fit: cover; + } } } @@ -173,9 +185,5 @@ @media not (min-width: 83rem) { .marquee-scroll-arrow { height: unset; - - & > div { - background-color: #55555580; - } } }