Skip to content

Commit

Permalink
Add word-break utility class (#518)
Browse files Browse the repository at this point in the history
* Add word-break utility class

* Rename style guide to make link to page correct
  • Loading branch information
hannaliebl authored and line47 committed Oct 17, 2019
1 parent 017476e commit c9ce0d0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/utilities/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
@import 'text-transform';
@import 'truncate';
@import 'vertical-align';
@import 'word-break'
24 changes: 24 additions & 0 deletions packages/core/src/utilities/word-break.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* stylelint-disable declaration-no-important */
@import '@cmsgov/design-system-support/src/settings/index';

/*
Word Break
Use the word break utility (`ds-u-word-break`) to prevent long strings of text from breaking layouts.
Markup:
<section class="ds-l-container preview__grid">
<div class="ds-l-row">
<div class="ds-l-col--3 ds-u-word-break">
<span class="ds-u-font-weight--bold">A long string:</span> Supercalifragilisticexpialidocious
</div>
</div>
</section>
Style guide: utilities.word-break
*/
.ds-u-word-break {
overflow-wrap: break-word;
// IE fallback
word-wrap: break-word;
}

0 comments on commit c9ce0d0

Please sign in to comment.