Skip to content

Commit c4b97f6

Browse files
authored
Migrate flex-grow -> grow and flex-shrink -> shrink (#14721)
This PR adds missing legacy migrations for migrating `flex-grow` to `grow` and `flex-shrink` to `shrink`. We already migrated `flex-grow-0` to `grow-0` and `flex-shrink-0` to `shrink-0`, but forgot about these cases.
1 parent b7c4d25 commit c4b97f6

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

CHANGELOG.md

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

1616
- Allow spaces spaces around operators in attribute selector variants ([#14703](https://github.com/tailwindlabs/tailwindcss/pull/14703))
17+
- _Upgrade (experimental)_: Migrate `flex-grow` to `grow` and `flex-shrink` to `shrink` ([#14721](https://github.com/tailwindlabs/tailwindcss/pull/14721))
1718

1819
### Changed
1920

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { simpleLegacyClasses } from './simple-legacy-classes'
55
test.each([
66
['overflow-clip', 'text-clip'],
77
['overflow-ellipsis', 'text-ellipsis'],
8+
['flex-grow', 'grow'],
89
['flex-grow-0', 'grow-0'],
10+
['flex-shrink', 'shrink'],
911
['flex-shrink-0', 'shrink-0'],
1012
['decoration-clone', 'box-decoration-clone'],
1113
['decoration-slice', 'box-decoration-slice'],

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import { printCandidate } from '../candidates'
77
const LEGACY_CLASS_MAP = {
88
'overflow-clip': 'text-clip',
99
'overflow-ellipsis': 'text-ellipsis',
10+
'flex-grow': 'grow',
1011
'flex-grow-0': 'grow-0',
12+
'flex-shrink': 'shrink',
1113
'flex-shrink-0': 'shrink-0',
1214
'decoration-clone': 'box-decoration-clone',
1315
'decoration-slice': 'box-decoration-slice',

0 commit comments

Comments
 (0)