What version of Tailwind CSS are you using?
v4.0.3
What version of Node.js are you using?
v23.7.0
What operating system are you using?
Arch Linux
Reproduction URL
https://github.com/fiws/tailwind-issue-f1
Describe your issue
After running npx @tailwindcss/upgrade@next, my "dark" theme config in the old tailwind.config.js was transformed into @custom-variant dark (@media not print { .dark & }); this does not work and appears to be invalid syntax. See below for details:
before
https://github.com/fiws/tailwind-issue-f1/blob/676604340b5ad3ef2384ea86ab79d755a82dfb40/tailwind.config.js#L7
// tailwind.config.js
darkMode: ["variant", "@media not print { .dark & }"],

after
https://github.com/fiws/tailwind-issue-f1/blob/main/src/index.css#L3
@custom-variant dark (@media not print { .dark & });


I also have no idea what to correct syntax is..
What version of Tailwind CSS are you using?
v4.0.3
What version of Node.js are you using?
v23.7.0
What operating system are you using?
Arch Linux
Reproduction URL
https://github.com/fiws/tailwind-issue-f1
Describe your issue
After running
npx @tailwindcss/upgrade@next, my "dark" theme config in the old tailwind.config.js was transformed into@custom-variant dark (@media not print { .dark & });this does not work and appears to be invalid syntax. See below for details:before
https://github.com/fiws/tailwind-issue-f1/blob/676604340b5ad3ef2384ea86ab79d755a82dfb40/tailwind.config.js#L7
after
https://github.com/fiws/tailwind-issue-f1/blob/main/src/index.css#L3
I also have no idea what to correct syntax is..