Skip to content

Commit 0c7088e

Browse files
authored
Generate the correct CSS for the break-keep utility (#15108)
Fixes #15107. Previously we were generating `word-break: break-keep` when it should be `word-break: keep-all`. --------- Co-authored-by: Adam Wathan <[email protected]>
1 parent de096f7 commit 0c7088e

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Use configured `--letter-spacing` values for custom font size utilities ([#15099](https://github.com/tailwindlabs/tailwindcss/pull/15099))
1313
- 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))
1414
- Don't print minified code when the build fails in the CLI ([#15106](https://github.com/tailwindlabs/tailwindcss/pull/15106))
15+
- Generate the correct CSS for the `break-keep` utility ([#15108](https://github.com/tailwindlabs/tailwindcss/pull/15108))
1516
- _Upgrade (experimental)_: Always add `layer(…)` as the first param to `@import` ([#15102](https://github.com/tailwindlabs/tailwindcss/pull/15102))
1617

1718
### Changed

packages/tailwindcss/src/utilities.test.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9212,23 +9212,23 @@ test('text-wrap', async () => {
92129212
test('overflow-wrap', async () => {
92139213
expect(await run(['break-normal', 'break-words', 'break-all', 'break-keep']))
92149214
.toMatchInlineSnapshot(`
9215-
".break-normal {
9216-
overflow-wrap: normal;
9217-
word-break: normal;
9218-
}
9215+
".break-normal {
9216+
overflow-wrap: normal;
9217+
word-break: normal;
9218+
}
92199219
9220-
.break-words {
9221-
overflow-wrap: break-word;
9222-
}
9220+
.break-words {
9221+
overflow-wrap: break-word;
9222+
}
92239223
9224-
.break-all {
9225-
word-break: break-all;
9226-
}
9224+
.break-all {
9225+
word-break: break-all;
9226+
}
92279227
9228-
.break-keep {
9229-
word-break: break-keep;
9230-
}"
9231-
`)
9228+
.break-keep {
9229+
word-break: keep-all;
9230+
}"
9231+
`)
92329232
expect(
92339233
await run([
92349234
'-break-normal',

packages/tailwindcss/src/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1963,7 +1963,7 @@ export function createUtilities(theme: Theme) {
19631963
])
19641964
staticUtility('break-words', [['overflow-wrap', 'break-word']])
19651965
staticUtility('break-all', [['word-break', 'break-all']])
1966-
staticUtility('break-keep', [['word-break', 'break-keep']])
1966+
staticUtility('break-keep', [['word-break', 'keep-all']])
19671967

19681968
{
19691969
// border-radius

0 commit comments

Comments
 (0)