]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Backport #30932
authorXhmikosR <xhmikosr@gmail.com>
Thu, 4 Jun 2020 07:04:33 +0000 (10:04 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Thu, 4 Jun 2020 14:53:16 +0000 (17:53 +0300)
Restore word-break: break-word on .text-break to fix text breaking on flex containers

scss/utilities/_text.scss
site/docs/4.5/utilities/text.md

index d2b2a22ed8f6f133ac32965e4b1d50b73465cf20..5d0f1c845f8d3f9ee60048532da547042c04cbc3 100644 (file)
@@ -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
index a9be539a2150b24e739aa0fe4c255434e82772eb..f9c73cff7d65c6785d5b868490ee633837f1b40c 100644 (file)
@@ -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 %}
 <p class="text-break">mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm</p>