Skip to content

Commit

Permalink
Add break-keep utility (#9393)
Browse files Browse the repository at this point in the history
* ✨ Add `word-break: keep-all` with `keep-all`

ref. https://developer.mozilla.org/en-US/docs/Web/CSS/word-break

`whitespace-nowrap` and `word-break: keep-all` behave differently in different browsers.

Demo: https://jsfiddle.net/h1aj6nvy/

There is a difference between Firefox and Google chrome.

* Rename `keep-all` to `break-keep`

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
  • Loading branch information
k-utsumi and reinink committed Sep 22, 2022
1 parent 1d82327 commit 2574a88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/corePlugins.js
Expand Up @@ -1222,6 +1222,7 @@ export let corePlugins = {
'.break-normal': { 'overflow-wrap': 'normal', 'word-break': 'normal' },
'.break-words': { 'overflow-wrap': 'break-word' },
'.break-all': { 'word-break': 'break-all' },
'.break-keep': { 'word-break': 'keep-all' },
})
},

Expand Down

0 comments on commit 2574a88

Please sign in to comment.