]> piware.de Git - chordpro-web.git/commit
Lay out chords and lyrics as segments
authorMartin Pitt <martin@piware.de>
Wed, 23 Sep 2026 20:30:13 +0000 (22:30 +0200)
committerMartin Pitt <martin@piware.de>
Wed, 23 Sep 2026 20:44:04 +0000 (22:44 +0200)
commita6e0318b5beb98ef7920a0a60426e429811445b0
tree94872f4095d1bbf4579ea9c09086ea111736fd98
parent176a988b44529cfb647949e5a8a9015225bb04fc
Lay out chords and lyrics as segments

Zero-width chords overlapped whenever the text under them, or even
empty: adjacent chords (intros/bridges without text), chords separated by
a single space, or a long chord name over a short syllable. The rule from
dc37808 only widened the second chord of a run, so the first pair still
collided.

Group each chord with the lyrics up to the next chord into a segment with
two rows. Its width is the wider of the two, which fixes the overlap.
chordpro-web.js
chordpro.css