Skip to content

Commit

Permalink
Add .wb-break-word class to existing .break-word (#1555)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan authored Aug 31, 2021
1 parent aaedef1 commit 4ae2174
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/healthy-ducks-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": minor
---

Add `.wb-break-word` class to existing `.break-word`
8 changes: 8 additions & 0 deletions deprecations.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
3 changes: 2 additions & 1 deletion src/utilities/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4ae2174

Please sign in to comment.