File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
packages/@tailwindcss-upgrade/src/codemods/css Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type { Config } from '../../../../tailwindcss/src/compat/plugin-api'
5
5
import type { DesignSystem } from '../../../../tailwindcss/src/design-system'
6
6
import { toKeyPath } from '../../../../tailwindcss/src/utils/to-key-path'
7
7
import * as ValueParser from '../../../../tailwindcss/src/value-parser'
8
+ import * as version from '../../utils/version'
8
9
9
10
// Defaults in v4
10
11
const DEFAULT_BORDER_COLOR = 'currentcolor'
@@ -46,6 +47,10 @@ export function migratePreflight({
46
47
}
47
48
48
49
function migrate ( root : Root ) {
50
+ // CSS for backwards compatibility with v3 should only injected in v3
51
+ // projects and not v4 projects.
52
+ if ( ! version . isMajor ( 3 ) ) return
53
+
49
54
let isTailwindRoot = false
50
55
root . walkAtRules ( 'import' , ( node ) => {
51
56
if (
You can’t perform that action at this time.
0 commit comments