Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Don’t index into strings with the `theme(…)` function ([#19111](https://github.com/tailwindlabs/tailwindcss/pull/19111))
- Fix parsing issue when `\t` is used in at-rules ([#19130](https://github.com/tailwindlabs/tailwindcss/pull/19130))
- Upgrade: Canonicalize utilities containing `0` values ([#19095](https://github.com/tailwindlabs/tailwindcss/pull/19095))
- Upgrade: Migrate deprecated `break-words` to `wrap-break-word` ([#19157](https://github.com/tailwindlabs/tailwindcss/pull/19157))

## [4.1.14] - 2025-10-01

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3606,7 +3606,6 @@ exports[`getClassList 1`] = `
"break-inside-avoid-page",
"break-keep",
"break-normal",
"break-words",
"brightness-0",
"brightness-50",
"brightness-75",
Expand Down
26 changes: 26 additions & 0 deletions packages/tailwindcss/src/canonicalize-candidates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,32 @@ describe.each([['default'], ['with-variant'], ['important'], ['prefix']])('%s',

await expectCanonicalization(input, candidate, expected)
})

test('`break-words` → `wrap-break-word`', async () => {
let candidate = 'break-words'
let expected = 'wrap-break-word'

let input = css`
@import 'tailwindcss';
`

await expectCanonicalization(input, candidate, expected)
})

test('`break-words` → `break-words` with custom implementation', async () => {
let candidate = 'break-words'
let expected = 'break-words'

let input = css`
@import 'tailwindcss';
@utility break-words {
break: words; /* imagine this exists */
}
`

await expectCanonicalization(input, candidate, expected)
})
})

describe('arbitrary variants', () => {
Expand Down
5 changes: 4 additions & 1 deletion packages/tailwindcss/src/canonicalize-candidates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,10 @@ function bareValueUtilities(candidate: Candidate, options: SignatureOptions): Ca

// ----

const DEPRECATION_MAP = new Map([['order-none', 'order-0']])
const DEPRECATION_MAP = new Map([
['order-none', 'order-0'],
['break-words', 'wrap-break-word'],
])

function deprecatedUtilities(candidate: Candidate, options: SignatureOptions): Candidate {
let designSystem = options.designSystem
Expand Down
1 change: 1 addition & 0 deletions packages/tailwindcss/src/compat/legacy-utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,5 @@ export function registerLegacyUtilities(designSystem: DesignSystem) {
})

designSystem.utilities.static('order-none', () => [decl('order', '0')])
designSystem.utilities.static('break-words', () => [decl('overflow-wrap', 'break-word')])
}
1 change: 0 additions & 1 deletion packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2156,7 +2156,6 @@ export function createUtilities(theme: Theme) {
['overflow-wrap', 'normal'],
['word-break', 'normal'],
])
staticUtility('break-words', [['overflow-wrap', 'break-word']])
staticUtility('break-all', [['word-break', 'break-all']])
staticUtility('break-keep', [['word-break', 'keep-all']])

Expand Down