From 288b9b82b5a5cb64ec3aaadef13ac934a957e5d2 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 4 Jun 2020 10:04:33 +0300 Subject: [PATCH] Backport #30932 Restore word-break: break-word on .text-break to fix text breaking on flex containers --- scss/utilities/_text.scss | 3 ++- site/docs/4.5/utilities/text.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scss/utilities/_text.scss b/scss/utilities/_text.scss index d2b2a22ed8f6..5d0f1c845f8d 100644 --- a/scss/utilities/_text.scss +++ b/scss/utilities/_text.scss @@ -63,7 +63,8 @@ .text-decoration-none { text-decoration: none !important; } .text-break { - word-wrap: break-word !important; + word-break: break-word !important; // IE & < Edge 18 + overflow-wrap: break-word !important; } // Reset diff --git a/site/docs/4.5/utilities/text.md b/site/docs/4.5/utilities/text.md index a9be539a2150..f9c73cff7d65 100644 --- a/site/docs/4.5/utilities/text.md +++ b/site/docs/4.5/utilities/text.md @@ -68,7 +68,7 @@ For longer content, you can add a `.text-truncate` class to truncate the text wi ## Word break -Prevent long strings of text from breaking your components' layout by using `.text-break` to set `word-wrap: break-word`. +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. {% capture example %}

mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm