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

Fix overflowing text in Cards with word-wrap: break-word #22740

Merged
merged 1 commit into from Jun 4, 2017

Conversation

pat270
Copy link
Contributor

@pat270 pat270 commented Jun 1, 2017

Demo: https://jsfiddle.net/4h6okLkn/2/

Long text with no whitespace overflow in cards, this fix should cover most long text in cards. I used word-wrap: break-word instead of word-break: break-all because it breaks up the words a little bit better.

@mdo
Copy link
Member

mdo commented Jun 2, 2017

I feel like adding this to the entire card would be overdoing it. How does this interact with more complex card contexts, subcomponents, etc? Wondering if it'd be better to make this an easier utility or apply it to multiple card classes.

@pat270
Copy link
Contributor Author

pat270 commented Jun 2, 2017

Hey @mdo,

I think having it on the entire card is the right thing to do. It makes all the card sub components function like they should e.g. .card-groups and .card-decks retain equal widths even with long text. .card-columns also works like it should.

It wasn't working in some of the sub components because I missed adding min-width: 0 to .card so the browser uses the card's width instead of the content's width when deciding if it should break-word.

@mdo mdo added this to the v4.0.0-beta milestone Jun 4, 2017
@mdo mdo merged commit 891bca4 into twbs:v4-dev Jun 4, 2017
@mdo mdo mentioned this pull request Jun 4, 2017
@mdo mdo added this to Safe to merge in v4 Beta 1 Jun 4, 2017
@mdo mdo moved this from Safe to merge to Shipped in v4 Beta 1 Jun 4, 2017
@mdo mdo marked this as a duplicate of #23061 Jul 14, 2017
mdo added a commit that referenced this pull request Dec 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v4 Beta 1
Shipped
Development

Successfully merging this pull request may close these issues.

None yet

2 participants