tholman / the-indie-web

A hotspot for indie creations on the web
https://theindieweb.com
GNU General Public License v3.0
254 stars 38 forks source link

Read More button wraps weirdly with long message #327

Closed TJScalzo closed 4 years ago

TJScalzo commented 4 years ago

When the message a the Read More button/box is too long, it will wrap to a second line. While it's good that it wraps instead of continuing outside the width of the article, it leaves white space to the right of the first line that looks weird.

Current Behavior: Screen Shot 2020-01-20 at 11 18 53 PM Desired Behavior: Screen Shot 2020-01-20 at 11 20 20 PM

According to this question and this answer on StackOverflow, there isn't easy way to get rid of the extra white space since the div defaults to the maximum width when its contents wrap. As those SO posts show, the "desired behavior" can be achieved with JS that manually resizes each box to eliminate the white space. But I think the easier solution is to just make the messages short enough to stay in one line. For example: Screen Shot 2020-01-20 at 11 38 51 PM

TJScalzo commented 4 years ago

Here's another example from "Now *this* is how you show off your new variable font."

Current Behavior: Screen Shot 2020-01-20 at 11 40 52 PM Desired Behavior: Screen Shot 2020-01-20 at 11 42 31 PM Shorter Message: Screen Shot 2020-01-20 at 11 40 43 PM

tholman commented 4 years ago

Adding a text-align: center will prob be the easiest fix here

Haroenv commented 4 years ago

I'm not weirded out enough yet is slightly shorter?

tholman commented 4 years ago

Yeah, totally should be keeping them short to prevent the wrap... centered it now anyhow, so its covered :)