Restore word-break: break-word on .text-break to fix text breaking on flex containers
.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
## 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>