From 540537c48148c46d417aabb5bf4a084fb3e5f87f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 16 Dec 2018 13:23:33 -0800 Subject: [PATCH 1/3] Add new .text-break utility for applying word-break: break-word --- scss/utilities/_text.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scss/utilities/_text.scss b/scss/utilities/_text.scss index 0edb8e58ba54..7762aa47df19 100644 --- a/scss/utilities/_text.scss +++ b/scss/utilities/_text.scss @@ -62,6 +62,8 @@ .text-decoration-none { text-decoration: none !important; } +.text-break { word-break: break-word !important; } + // Reset .text-reset { color: inherit !important; } From 353c8b4376deb0426167e6908b599ee4aa842537 Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Mon, 17 Dec 2018 09:48:06 -0800 Subject: [PATCH 2/3] Update scss/utilities/_text.scss Co-Authored-By: mdo --- scss/utilities/_text.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scss/utilities/_text.scss b/scss/utilities/_text.scss index 7762aa47df19..a04fd097d7ef 100644 --- a/scss/utilities/_text.scss +++ b/scss/utilities/_text.scss @@ -62,7 +62,7 @@ .text-decoration-none { text-decoration: none !important; } -.text-break { word-break: break-word !important; } +.text-break { word-break: break-word !important; } // Reset From f7bf353cdcc5c36641dfd2a694c8ccd4815e4a5f Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 17 Dec 2018 09:58:18 -0800 Subject: [PATCH 3/3] Add docs for .text-break --- site/docs/4.1/utilities/text.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/site/docs/4.1/utilities/text.md b/site/docs/4.1/utilities/text.md index 0b493d5623fd..04f564c335c5 100644 --- a/site/docs/4.1/utilities/text.md +++ b/site/docs/4.1/utilities/text.md @@ -66,6 +66,15 @@ For longer content, you can add a `.text-truncate` class to truncate the text wi {% endcapture %} {% include example.html content=example %} +## Word break + +Prevent long strings of text from breaking your components' layout by using `.text-break` to set `word-break: break-word`. + +{% capture example %} +

mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

+{% endcapture %} +{% include example.html content=example %} + ## Text transform Transform text in components with text capitalization classes.