fix(ui): backdrop now moves in every browser
build-and-deploy / build (push) Failing after 14m47s

The backdrop's only motion was the scroll-driven pan (animation-timeline:
scroll()), which is Chromium-only — so in Firefox/Safari the board sat dead
still. Add a continuous timed top↔bottom drift (48s, alternates) as the
universal baseline; keep the scroll-coupled pan as a Chromium enhancement that
overrides it. Motion-safe: both gated behind prefers-reduced-motion.
This commit is contained in:
2026-06-27 20:54:08 +10:00
parent 2aae7c287e
commit af7e0287d4
+21 -3
View File
@@ -420,6 +420,16 @@ svg {
rgba(246, 248, 251, 0.82) 100% rgba(246, 248, 251, 0.82) 100%
); );
} }
/* BASELINE motion (works in EVERY browser, no JS): a slow, continuous top↔bottom
drift. This is the guaranteed fallback — Firefox/Safari don't support
scroll-driven animations, so without this the board would sit dead-still. */
@media (prefers-reduced-motion: no-preference) {
.site-bg__img {
animation: bgDrift 48s ease-in-out infinite alternate;
}
}
/* ENHANCEMENT: where scroll-driven animations exist (Chromium), couple the pan
to scroll position instead — overrides the timed drift on the same element. */
@supports (animation-timeline: scroll()) { @supports (animation-timeline: scroll()) {
@media (prefers-reduced-motion: no-preference) { @media (prefers-reduced-motion: no-preference) {
.site-bg__img { .site-bg__img {
@@ -428,9 +438,17 @@ svg {
} }
} }
} }
/* Clean monotonic top→bottom pan: as the page scrolls, the board slowly drifts /* Continuous timed drift (fallback) — gentle, alternates so it never jumps. */
so the motion is always obvious (no wandering loop that nets to zero). ~40% of @keyframes bgDrift {
the 215%-tall image = a long, continuous travel. */ from {
transform: translate(-50%, -38%);
}
to {
transform: translate(-50%, -62%);
}
}
/* Scroll-coupled monotonic top→bottom pan (Chromium): ~44% travel of the
215%-tall image, tied directly to page scroll progress. */
@keyframes bgPan { @keyframes bgPan {
from { from {
transform: translate(-50%, -28%); transform: translate(-50%, -28%);