Skip to content

Commit 3ab98f0

Browse files
Upgrade: Do not migrate overflow-clip utility (#15244)
`overflow-clip` was the name for `text-clip` in v4. However, that was changed in v3 already so in v3 `overflow-clip` is already doing the same as in v4. Hence a codemod is not necessary. Co-authored-by: Adam Wathan <[email protected]>
1 parent 99b73ee commit 3ab98f0

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Don't scan source files for utilities unless `@tailwind utilities` is present in the CSS in `@tailwindcss/postcss` and `@tailwindcss/vite` ([#15226](https://github.com/tailwindlabs/tailwindcss/pull/15226))
1313
- Skip reserializing CSS files that don't use Tailwind features in `@tailwindcss/postcss` and `@tailwindcss/vite` ([#15226](https://github.com/tailwindlabs/tailwindcss/pull/15226))
14+
- _Upgrade (experimental)_: Do not migrate the `overflow-clip` utility ([#15244](https://github.com/tailwindlabs/tailwindcss/pull/15244))
1415

1516
## [4.0.0-beta.3] - 2024-11-27
1617

packages/@tailwindcss-upgrade/src/template/codemods/simple-legacy-classes.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { expect, test } from 'vitest'
33
import { simpleLegacyClasses } from './simple-legacy-classes'
44

55
test.each([
6-
['overflow-clip', 'text-clip'],
76
['overflow-ellipsis', 'text-ellipsis'],
87
['flex-grow', 'grow'],
98
['flex-grow-0', 'grow-0'],
@@ -17,6 +16,9 @@ test.each([
1716
['max-lg:hover:!decoration-slice', 'max-lg:hover:box-decoration-slice!'],
1817

1918
['focus:outline-none', 'focus:outline-hidden'],
19+
20+
// Should not convert v2 utilities
21+
['overflow-clip', 'overflow-clip'],
2022
])('%s => %s', async (candidate, result) => {
2123
let designSystem = await __unstable__loadDesignSystem('@import "tailwindcss";', {
2224
base: __dirname,

packages/@tailwindcss-upgrade/src/template/codemods/simple-legacy-classes.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { printCandidate } from '../candidates'
55
// Classes that used to exist in Tailwind CSS v3, but do not exist in Tailwind
66
// CSS v4 anymore.
77
const LEGACY_CLASS_MAP = {
8-
'overflow-clip': 'text-clip',
98
'overflow-ellipsis': 'text-ellipsis',
109

1110
'flex-grow': 'grow',

0 commit comments

Comments
 (0)