Skip to content

Add word-break utility class#518

Merged
line47 merged 4 commits intomasterfrom
add-word-break-utility
Oct 17, 2019
Merged

Add word-break utility class#518
line47 merged 4 commits intomasterfrom
add-word-break-utility

Conversation

@hannaliebl
Copy link
Copy Markdown
Contributor

Added

Added a word break utility class, .ds-u-word-break.

I wrote a style like this for our shared component library for plancompare/windowshop (long drug names on plan cards, for example, won't wrap properly without a class like this.) And then I thought maybe a utility class in the design system would be useful.

I am open to suggestions about whether this belongs here, whether it should be called something different, and if I'm describing this accurately.

Here it is applied in Chrome:
Screen Shot 2019-10-15 at 7 10 46 PM

Here it is un-applied in Chrome:
Screen Shot 2019-10-15 at 7 10 29 PM

For what it's worth, Bootstrap calls this type of utility word break but the class text break. They use word-break: break-word, but this actually doesn't work in IE 11. (there's an outstanding PR in Bootstrap to fix this.) So I think this is the way to make this work across browsers.

@line47
Copy link
Copy Markdown
Contributor

line47 commented Oct 16, 2019

Thanks for adding this @hannaliebl !

Copy link
Copy Markdown
Contributor

@line47 line47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me

@line47 line47 merged commit c9ce0d0 into master Oct 17, 2019
@line47 line47 deleted the add-word-break-utility branch October 17, 2019 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants