Skip to content

Commit

Permalink
Generate the correct CSS for the break-keep utility (#15108)
Browse files Browse the repository at this point in the history
Fixes #15107.

Previously we were generating `word-break: break-keep` when it should be
`word-break: keep-all`.

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
  • Loading branch information
adamwathan and adamwathan authored Nov 22, 2024
1 parent de096f7 commit 0c7088e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Use configured `--letter-spacing` values for custom font size utilities ([#15099](https://github.com/tailwindlabs/tailwindcss/pull/15099))
- Ensure `space-x/y-*` and `divide-x/y-*` with variants can undo `space-x/y-reverse` and `divide-x/y-reverse` ([#15094](https://github.com/tailwindlabs/tailwindcss/pull/15094))
- Don't print minified code when the build fails in the CLI ([#15106](https://github.com/tailwindlabs/tailwindcss/pull/15106))
- Generate the correct CSS for the `break-keep` utility ([#15108](https://github.com/tailwindlabs/tailwindcss/pull/15108))
- _Upgrade (experimental)_: Always add `layer(…)` as the first param to `@import` ([#15102](https://github.com/tailwindlabs/tailwindcss/pull/15102))

### Changed
Expand Down
28 changes: 14 additions & 14 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9212,23 +9212,23 @@ test('text-wrap', async () => {
test('overflow-wrap', async () => {
expect(await run(['break-normal', 'break-words', 'break-all', 'break-keep']))
.toMatchInlineSnapshot(`
".break-normal {
overflow-wrap: normal;
word-break: normal;
}
".break-normal {
overflow-wrap: normal;
word-break: normal;
}
.break-words {
overflow-wrap: break-word;
}
.break-words {
overflow-wrap: break-word;
}
.break-all {
word-break: break-all;
}
.break-all {
word-break: break-all;
}
.break-keep {
word-break: break-keep;
}"
`)
.break-keep {
word-break: keep-all;
}"
`)
expect(
await run([
'-break-normal',
Expand Down
2 changes: 1 addition & 1 deletion packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1963,7 +1963,7 @@ export function createUtilities(theme: Theme) {
])
staticUtility('break-words', [['overflow-wrap', 'break-word']])
staticUtility('break-all', [['word-break', 'break-all']])
staticUtility('break-keep', [['word-break', 'break-keep']])
staticUtility('break-keep', [['word-break', 'keep-all']])

{
// border-radius
Expand Down

0 comments on commit 0c7088e

Please sign in to comment.