Skip to content

Commit

Permalink
Add second class for other contexts.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankieroberto committed Nov 19, 2024
1 parent 4cfc228 commit 82d8391
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/core/utilities/_word-breaks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,16 @@
.nhsuk-u-word-break-all {
word-break: break-all;
}


/**
* This class also allows words to be broken between any 2
* to avoid overflowing their container, but will try
* and avoid it by placing the entire word on its own
* line first. However this does not work in tables.
*
* Usage: class="nhsuk-u-word-break-all"
*/
.nhsuk-u-word-break-word {
overflow-wrap: break-word;
}

0 comments on commit 82d8391

Please sign in to comment.