Skip to content

Commit 1b53461

Browse files
committed
add migrations for newly deprecated classes
- `bg-{left,right}-{top,bottom}` in favor of `bg-{top,bottom}-{left,right}` - `object-{left,right}-{top,bottom}` in favor of `object-{top,bottom}-{left,right}`
1 parent 4f987fa commit 1b53461

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ const LEGACY_CLASS_MAP: Record<string, string> = {
1515

1616
'decoration-clone': 'box-decoration-clone',
1717
'decoration-slice': 'box-decoration-slice',
18+
19+
// Since v4.1.0
20+
'bg-left-top': 'bg-top-left',
21+
'bg-left-bottom': 'bg-bottom-left',
22+
'bg-right-top': 'bg-top-right',
23+
'bg-right-bottom': 'bg-bottom-right',
24+
'object-left-top': 'object-top-left',
25+
'object-left-bottom': 'object-bottom-left',
26+
'object-right-top': 'object-top-right',
27+
'object-right-bottom': 'object-bottom-right',
1828
}
1929

2030
let seenDesignSystems = new WeakSet<DesignSystem>()

0 commit comments

Comments
 (0)