perf(lyrics): drop karaoke gradient in non-immersive CPU mode

Follow-up to #418 (karaoke playback overhaul). In CPU mode the
background-clip: text repaint plus the per-frame --line-progress
interpolation that drives the gradient stop are both costly under
software compositing. Immersive already swaps the gradient for solid
white (kept), but sidebar/static/compact surfaces still ran the
expensive path.

Adds a global override under html.no-hwaccel that zeroes the gradient,
restores a solid accent color, and kills the --line-progress transition.
Active-line emphasis still reads via the font-size/weight/scale from
.lyrics-line.active, which is unchanged. The immersive solid-white rule
keeps winning on specificity (0,0,5,0 vs 0,0,4,1), so this only takes
effect on the non-immersive surfaces where the gradient was the cost.

cc
This commit is contained in:
vicrodh committed 2026-05-13 10:53:07 -06:00
1 parent 427e1b5bec
commit 653201346a
1 file changed
+15
@@ -737,6 +737,21 @@
-webkit-text-fill-color: #ffffff;
}
/* CPU mode: kill the karaoke gradient in non-immersive lyrics views too
(sidebar/static/compact). background-clip: text repaint + per-frame
--line-progress interpolation are both expensive under software
compositing. Drop to a solid accent color; emphasis still reads via
font-size + weight + scale from .lyrics-line.active. Immersive
already neutralizes the gradient above (.lyrics-lines.immersive
specificity 0,0,5,0 wins over our 0,0,4,1), so this rule only fires
in the non-immersive surfaces. */
:global(html.no-hwaccel .lyrics-line.active .line-segment) {
background: none !important;
color: var(--lyrics-active-color, var(--accent-primary)) !important;
-webkit-text-fill-color: var(--lyrics-active-color, var(--accent-primary)) !important;
transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
.lyrics-line.active {
transition: none;