This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
Make long song titles with the same prefix visually distinguishable #52
Labels
enhancement
New feature or request
It'd be nice to elide titles differently in the
song-table
component when there are a bunch that start with the same prefix:It looks like
text-overflow
has a two-value form for specifying different behavior for the start and end of the text, but per https://caniuse.com/mdn-css_properties_text-overflow_two_value_syntax it's only supported in Firefox. (https://chromestatus.com/feature/5090725653905408 was just trackingoverflow
, nottext-overflow
.)Here are some hacks:
It sounds like the best CSS option might be using
direction: rtl
, but that seems like it might cause other problems.unicode-bidi: plaintext
might also be needed to prevent punctuation from being treated as LTR.The other option would be mangling the titles via JS, but that also feels gross. For example, I could imagine something like this: if a title overflows and shares its first
n
chars with the previous title, then replace the prefix with…
. I'd probably want to scan the whole table and repeat that process whenever the table is changed. Yuck.The text was updated successfully, but these errors were encountered: