From 4ae2174e33d3bd9be418176af4de75dd97b761c5 Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Mon, 30 Aug 2021 17:42:26 -0700 Subject: [PATCH] Add `.wb-break-word` class to existing `.break-word` (#1555) --- .changeset/healthy-ducks-wave.md | 5 +++++ deprecations.js | 8 ++++++++ src/utilities/typography.scss | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .changeset/healthy-ducks-wave.md diff --git a/.changeset/healthy-ducks-wave.md b/.changeset/healthy-ducks-wave.md new file mode 100644 index 00000000..787d673e --- /dev/null +++ b/.changeset/healthy-ducks-wave.md @@ -0,0 +1,5 @@ +--- +"@primer/css": minor +--- + +Add `.wb-break-word` class to existing `.break-word` diff --git a/deprecations.js b/deprecations.js index 49f7dd7e..a162d17f 100644 --- a/deprecations.js +++ b/deprecations.js @@ -6,6 +6,14 @@ import fs from 'fs' * array and a "message" string. */ const versionDeprecations = { + '17.6.1': [ + { + selectors: [ + '.break-word' + ], + message: 'The .break-word class has been deprecated, use .wb-break-word instead.' + } + ], '17.0.0': [ { variables: ['$h000-size', '$h000-size-mobile'], diff --git a/src/utilities/typography.scss b/src/utilities/typography.scss index e69f3364..83585db7 100644 --- a/src/utilities/typography.scss +++ b/src/utilities/typography.scss @@ -208,7 +208,8 @@ .ws-normal { white-space: normal !important; } /* Force long "words" to wrap if they exceed the width of the container */ -.break-word { +.break-word, // deprecated +.wb-break-word { word-break: break-word !important; // this is for backwards compatibility with browsers that don't respect overflow-wrap word-wrap: break-word !important;