Skip to content
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

Add utility class for word-wrap/word-break #19315

Closed
0xadri opened this issue Feb 25, 2016 · 2 comments
Closed

Add utility class for word-wrap/word-break #19315

0xadri opened this issue Feb 25, 2016 · 2 comments

Comments

@0xadri
Copy link

0xadri commented Feb 25, 2016

Relevant pull request: #19316

Very long words can break out of its containing tag.

One can force these long words to break to the next line(s) if necessary.

See an example on https://jsfiddle.net/AdrienBe/n16vqz5p/

Resources:
http://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/
http://stackoverflow.com/questions/320184/how-to-prevent-long-words-from-breaking-my-div
http://caniuse.com/#search=word-wrap
http://stackoverflow.com/a/22811590/759452
http://developer.mozilla.org/en-US/docs/Web/CSS/word-wrap

@cvrebert cvrebert changed the title New feature for Utility classes: breaking long words to next line if necessary Add utility class for word-wrap/word-break Feb 25, 2016
@eddyerburgh
Copy link
Contributor

eddyerburgh commented May 4, 2016

I suggest adding this to body :

body {
  // Stop words overflowing 
  word-wrap: break-word; 
}

@mdo mdo modified the milestone: v4.1 ideas Oct 24, 2016
@vanillajonathan
Copy link
Contributor

https://getbootstrap.com/docs/4.0/utilities/text/

There is the .text-nowrap class and the .text-truncate class. There is no class to force long lines uninterrupted words to break into new lines though.

Perhaps there ought to be a .text-wrap or .break-word class.

.text-wrap {
  word-wrap: break-word; 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants