-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
word-break vs word-wrap #835
Comments
Those docs are correct for v1 and the v0.7.4 docs are correct for v0.7.4, there's a few little differences in this particular module. v0.7.4: .break-words {
word-wrap: break-word;
}
.break-normal {
word-wrap: normal;
}
.truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} v1: .break-normal {
overflow-wrap: normal;
word-break: normal;
}
.break-words {
overflow-wrap: break-word;
}
.break-all {
word-break: break-all;
}
.truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} |
Hi... We're on v2 now but Could it be safe to just define both? |
Same here. Take for instance a super long words - which are common for indo-european languages (eg german) - like 'Veranstaltungsinformationsdienst'. Tailwind's '.break-words'-utility won't break it. A custom class with 'word-break: break-word;' will do the job, while also preserving somewhat correct breakpoints that would get lost by using '.break-all'. Any thoughts on this? |
The proposed solution (define both) seems great. Maybe the issue can be reopened? |
@adamwathan Any chance to jump back in? |
Hey! We don't monitor closed issues but if you think this should be revisited totally cool with me to open a new issue with a convincing motivating example 👍🏻 |
I had a similar problem with this issue, because only Why use both properties on |
I've come up with an Codepen example where |
@jokull Thank you, I found the same problematic situation where Note that |
@Smerity Thanks for linking the relevant issues. For those using |
this saved me an hour |
@Smerity Thanks. |
It blows my mind how tailwind, even in 2023, doesn't have a class which performs a simple: I had to add it myself... |
@xyba1337 this has been addressed multiple times (#10004 (comment), #4340 (comment), #3393 (comment)). It's because More info: https://developer.mozilla.org/en-US/docs/Web/CSS/word-break#syntax |
@RobinMalfait, any chance there could be support for Based on the documentation from
This will also help avoid the |
I just did some research (unocss/unocss#2614 (comment)) about @RobinMalfait @adamwathan Hope this issue can be re-open again. |
#12127 Created a related research and discussion for this issue. |
https://next.tailwindcss.com/docs/word-break/#content
The
word-break
utilities documentation says it appliesword-break
, but its actually applying theword-wrap
property.I'm using v0.7.x
Is this changed in v1 or is it a bug?
The text was updated successfully, but these errors were encountered: