diff --git a/src/components/SkillsCarousel.jsx b/src/components/SkillsCarousel.jsx index 24ab513..e08f25b 100644 --- a/src/components/SkillsCarousel.jsx +++ b/src/components/SkillsCarousel.jsx @@ -1,15 +1,18 @@ import { skills } from "../content.js"; +// Even copy count so the -50% translate lands on a copy boundary +// (seamless loop); 12 copies keep half the track (~5000px) far wider +// than any real viewport, so the right edge never gaps. +const COPIES = 12; + function Marquee({ label, items }) { - // Four copies so the track always covers the viewport on wide screens; - // the -50% translate lands on a copy boundary, keeping the loop seamless. - const row = [...items, ...items, ...items, ...items]; + const row = Array.from({ length: COPIES }, () => items).flat(); return (

{label}

@@ -17,7 +20,7 @@ function Marquee({ label, items }) { = items.length * 2} + aria-hidden={i >= items.length * (COPIES / 2)} > {item}