Splitting icon indicating copy to clipboard operation
Splitting copied to clipboard

Lines display incorrectly with hyphenated words

Open kjbrum opened this issue 5 years ago • 5 comments

Hyphenated words get treated as a single word (which makes sense), but this can cause the second part of the word to break to a new line and causes issues when animating.

Example of the behavior can be seen here: https://codepen.io/kjbrum/pen/jOEoNMx

kjbrum avatar Jan 29 '20 16:01 kjbrum

We could consider treating hyphenated words as separate words. There is some nuance here though. I am not sure if the hyphen should be considered a separate word or if the hyphen should end up on the first word. WDYT @shshaw ?

notoriousb1t avatar Mar 15 '20 17:03 notoriousb1t

That's a good point. I ended up replacing each hyphen with <span class="hyphen">-</span>.

kjbrum avatar Mar 16 '20 16:03 kjbrum

@kjbrum How did you do this? Looking for a solution :)

Gbillington1 avatar Apr 01 '20 19:04 Gbillington1

@Gbillington1 You can find an iteration of my final solution here. I believe I had to make some adjustments after I implemented it into my project, but it should help a bit.

https://codepen.io/kjbrum/pen/rNagKgX

kjbrum avatar Apr 01 '20 19:04 kjbrum

Thanks! @kjbrum

Gbillington1 avatar Apr 01 '20 20:04 Gbillington1