feat(lyrics): metallic shimmer effect for karaoke
Replace underline with metallic shimmer that sweeps across text: - Mostly white (40% each side) with purple highlight band in center - Gradient moves from right to left during line duration - Uses ease-in-out for natural feel - GPU-accelerated, single element, no JS polling
This commit is contained in:
1 parent
c1a7a5977a
commit
fc382a2237
1 file changed
+19
-25
@@ -282,43 +282,37 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* CSS-only karaoke animation in immersive mode */
|
/* CSS-only karaoke animation in immersive mode */
|
||||||
/* Uses pseudo-element underline sweep - keeps text bright white */
|
/* Metallic shimmer effect - GPU accelerated, single element */
|
||||||
.lyrics-lines.immersive .lyrics-line.active .line-text {
|
.lyrics-lines.immersive .lyrics-line.active .line-text {
|
||||||
--duration: var(--line-duration, 3000ms);
|
--duration: var(--line-duration, 3000ms);
|
||||||
position: relative;
|
/* Base bright white text */
|
||||||
display: inline-block;
|
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
/* Metallic shimmer gradient */
|
||||||
|
|
||||||
/* Glowing underline that sweeps left to right */
|
|
||||||
.lyrics-lines.immersive .lyrics-line.active .line-text::after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
bottom: -2px;
|
|
||||||
left: 0;
|
|
||||||
height: 3px;
|
|
||||||
width: 0%;
|
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
90deg,
|
90deg,
|
||||||
transparent 0%,
|
#ffffff 0%,
|
||||||
#a78bfa 20%,
|
#ffffff 40%,
|
||||||
|
#e9d5ff 45%,
|
||||||
#c4b5fd 50%,
|
#c4b5fd 50%,
|
||||||
#a78bfa 80%,
|
#e9d5ff 55%,
|
||||||
transparent 100%
|
#ffffff 60%,
|
||||||
|
#ffffff 100%
|
||||||
);
|
);
|
||||||
border-radius: 2px;
|
background-size: 300% 100%;
|
||||||
box-shadow:
|
background-position: 100% 0;
|
||||||
0 0 8px #a78bfa,
|
-webkit-background-clip: text;
|
||||||
0 0 16px rgba(167, 139, 250, 0.5);
|
background-clip: text;
|
||||||
animation: karaoke-underline var(--duration) linear forwards;
|
color: transparent;
|
||||||
|
/* Shimmer moves across during line duration */
|
||||||
|
animation: metallic-shimmer var(--duration) ease-in-out forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes karaoke-underline {
|
@keyframes metallic-shimmer {
|
||||||
0% {
|
0% {
|
||||||
width: 0%;
|
background-position: 100% 0;
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
width: 100%;
|
background-position: -100% 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user