From 3c24ddc7d3ad0454a698b5cb49c9d2ed67993026 Mon Sep 17 00:00:00 2001 From: Moepchi Date: Thu, 22 Oct 2026 19:54:33 +0000 Subject: [PATCH] News ticker: constant scroll speed Derive the animation duration from the distance travelled instead of the item count, so wide screens no longer scroll faster. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU --- web/src/App.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index 608739e..22a4834 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -2658,7 +2658,14 @@ function NewsTicker() {
{t("news.label")}
-
+ {/* Duration from the distance travelled (track + text), so the speed is + the same ~60 px/s on every screen width. */} +
{ + if (el) el.style.animationDuration = `${el.scrollWidth / 60}s`; + }} + > {entries}