From 2b05d5844d8c65eb50586d776dba9b78e3011bf4 Mon Sep 17 00:00:00 2001 From: ltadeu6 Date: Mon, 8 Jun 2026 17:16:30 -0300 Subject: [PATCH] fix: explicit width on lyric-display + simplify scroll logic position:absolute children with width:100% require explicit parent width. max-width alone leaves the container at 0px, hiding all text via overflow:hidden. Also removed jump-detection branch to avoid opacity:0 dead-ends. Co-Authored-By: Claude Sonnet 4.6 --- plugin/contents/ui/dancer.html | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/plugin/contents/ui/dancer.html b/plugin/contents/ui/dancer.html index 9f66db5..7345ffb 100644 --- a/plugin/contents/ui/dancer.html +++ b/plugin/contents/ui/dancer.html @@ -243,7 +243,7 @@ html, body { position: absolute; left: 2%; top: 4%; - max-width: 38%; + width: 38%; /* explicit width needed for abs-pos children */ height: 150px; /* 5 slots × 30px */ overflow: hidden; pointer-events: none; @@ -252,6 +252,7 @@ html, body { } .lyric-ctx { position: absolute; + left: 0; width: 100%; height: 30px; line-height: 30px; @@ -261,10 +262,10 @@ html, body { overflow: hidden; text-overflow: ellipsis; transition: - top 0.5s cubic-bezier(0.4, 0, 0.2, 1), - opacity 0.45s ease, - font-size 0.35s ease, - color 0.35s ease, + top 0.5s cubic-bezier(0.4, 0, 0.2, 1), + opacity 0.45s ease, + font-size 0.35s ease, + color 0.35s ease, text-shadow 0.35s ease; } @@ -1256,19 +1257,14 @@ function updateLyricContext(context) { lyricDisplay.style.opacity = '1'; return; } - const wasNextLine = ring[3]?.textContent === active.text; currentActive = active.text; if (lyricDisplay.style.opacity !== '1') { initSlots(context); - lyricDisplay.style.opacity = '1'; - } else if (wasNextLine) { - scrollUp(context); } else { - // jumped position: crossfade to new context - lyricDisplay.style.opacity = '0'; - setTimeout(() => { initSlots(context); lyricDisplay.style.opacity = '1'; }, 400); + scrollUp(context); } + lyricDisplay.style.opacity = '1'; } function fetchCurrent() {