Skip to content

Commit

Permalink
Restore word-break: break-word on .text-break to fix text breaking on…
Browse files Browse the repository at this point in the history
… flex containers (twbs#30932)
  • Loading branch information
mdo authored and olsza committed Oct 3, 2020
1 parent 669c52a commit 3ec0875
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scss/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ $utilities: map-merge(
values: italic normal
),
"word-wrap": (
property: word-wrap,
property: word-wrap word-break,
class: text,
values: (break: break-word)
),
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.0/utilities/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Prevent text from wrapping with a `.text-nowrap` class.

## Word break

Prevent long strings of text from breaking your components' layout by using `.text-break` to set `word-wrap: break-word`. We use `word-wrap` instead of the more common `overflow-wrap` for wider browser support.
Prevent long strings of text from breaking your components' layout by using `.text-break` to set `word-wrap: break-word` and `word-break: break-word`. We use `word-wrap` instead of the more common `overflow-wrap` for wider browser support, and add the deprecated `word-break: break-word` to avoid issues with flex containers.

{{< example >}}
<p class="text-break">mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm</p>
Expand Down

0 comments on commit 3ec0875

Please sign in to comment.