Follow the song in the lyrics
Synced LRC highlights the playing line, keeps it centred and seeks on click. Plain text scrolls continuously with a nudge knob instead — a highlight on guessed timings turns guaranteed drift into what looks like a bug. Seuraa kappaletta turns following off without losing the highlight, and scrolling by hand turns it off too. Fixes the scroll landing in the wrong place (offsetTop measured from a different coordinate space than the box it was applied to) and the fader shifting the deck sideways at score 100 (auto-sized grid columns plus a readout spanning both).
This commit is contained in:
+39
-3
@@ -485,11 +485,45 @@ button.link:hover { background: none; color: var(--primary-hover); }
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.7;
|
||||
font-size: 0.95rem;
|
||||
/* Scrolling is smoothed in JS, which also knows when to skip it. Doing it here as well makes two
|
||||
mechanisms fight over the same element. */
|
||||
}
|
||||
|
||||
/* Synced lyrics: the line that is playing is the only bright one, and clicking any line seeks. */
|
||||
.lyricsbox.synced { white-space: normal; }
|
||||
|
||||
.lline {
|
||||
margin: 0;
|
||||
padding: 0.1rem 0;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
transition: color var(--duration-fast) var(--ease-out);
|
||||
}
|
||||
|
||||
.lline:hover { color: var(--text); }
|
||||
|
||||
.lline.on {
|
||||
color: var(--gold-1);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Uniform distribution models a song no real song obeys, so the reader gets a knob. */
|
||||
.follow { display: flex; align-items: center; gap: var(--space-2); font-size: 0.8rem;
|
||||
color: var(--muted); cursor: pointer; }
|
||||
.follow input { width: auto; accent-color: var(--primary); }
|
||||
|
||||
.nudge { display: flex; align-items: center; gap: var(--space-2); font-size: 0.75rem;
|
||||
color: var(--muted); font-family: var(--font-display); text-transform: uppercase;
|
||||
letter-spacing: 0.06em; }
|
||||
.nudge input { flex: 1; accent-color: var(--primary); }
|
||||
.nudge output { min-width: 4ch; text-align: right; color: var(--text); }
|
||||
|
||||
.deck .player { margin: 0; }
|
||||
.deckfoot { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
|
||||
|
||||
.fader { display: grid; grid-template-columns: auto auto; grid-template-rows: 1fr auto;
|
||||
/* Fixed columns, not auto: the readout spans both, so an auto track would widen the whole fader
|
||||
when the score reaches three digits and shove the deck sideways mid-drag. */
|
||||
.fader { display: grid; grid-template-columns: 2rem 2rem; grid-template-rows: 1fr auto;
|
||||
gap: var(--space-2); align-items: stretch; }
|
||||
|
||||
.ticks { display: flex; flex-direction: column; justify-content: space-between; text-align: right;
|
||||
@@ -548,14 +582,16 @@ button.link:hover { background: none; color: var(--primary-hover); }
|
||||
.readout {
|
||||
grid-column: 1 / -1;
|
||||
font-family: var(--font-display);
|
||||
font-size: 2rem;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 700;
|
||||
/* Digits of equal width, so 99 → 100 does not shift anything inside the box either. */
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: var(--gold-1);
|
||||
text-align: center;
|
||||
background: var(--bar);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: var(--radius);
|
||||
padding: 0 var(--space-2);
|
||||
padding: 0 var(--space-1);
|
||||
}
|
||||
|
||||
/* --- the reveal: one channel per reviewer --- */
|
||||
|
||||
Reference in New Issue
Block a user