discordlist-gg / beta-issues

5 stars 1 forks source link

[ui] Bot pack descriptions wrap in the middle of words #295

Closed doinkythederp closed 2 years ago

doinkythederp commented 2 years ago

Page

https://discordlist.gg/pack/:id

Description

When bot packs have very long descriptions, words are wrapped onto to next line. However, this breaks up words, making them harder to read and stylistically unpleasant.

Bot pack description with several words abruptly broken

Preferred solution

The best way to fix this would be to not break words unless needed, and insert hyphens when breaking:

Bot pack description featuring hyphenated breaking and words wrapped without being broken

Here's what I changed to make this mockup:

- <h2 class="mt-3 text-base break-all whitespace-pre-line text-on-hero-800">
+ <h2 class="mt-3 text-base break-words whitespace-pre-line text-on-hero-800 hyphens-auto">

Tailwind doesn't have a hyphens-auto utility class by default, but you could try out this package or add the following CSS:

.hyphens-auto {
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
}

What browsers are you seeing the problem on?

Chrome

Notify on issue updates

Discord username

doinkythederp#6523

audn commented 2 years ago

Hi, Thank you for the well-written issue!

Fixed 🎉

I will proceed to close the issue.

Thank you for contributing during beta!