tailwindcss/packages/@tailwindcss-upgrade/src
Philipp Spiess a1e083afc5
Upgrade: Handle darkMode value with block syntax (#16507)
Closes #16171

This PR handles `darkMode` variant configs containing braces (so
creating sub-rules) the same way we handle it in the interop layer.
Since the interop layer runs inside the `addVariant` API that we do not
run here, I instead oped to copy the one liner.

## Test plan

Updated one of the migration tests to include a rule that wasn't working
before. Ensured the new output works via
https://play.tailwindcss.com/nR99uhKtv3
2025-02-14 16:48:52 +01:00
..
codemods Implement @variant (#15663) 2025-01-21 10:20:35 -05:00
commands/help Add initial codemod tooling (#14434) 2024-09-18 16:45:43 +02:00
template fix(upgrade): prevent nextjs image blur property from modified (#16405) 2025-02-11 17:37:59 +01:00
utils Upgrade: Report errors when updating dependencies (#16504) 2025-02-13 16:02:59 +01:00
index.test.ts Revert new default form styles (#15100) 2024-11-22 08:55:05 -05:00
index.ts Upgrade: Error when project is already using Tailwind CSS v4 (#15015) 2024-11-19 15:53:02 +01:00
migrate-js-config.ts Upgrade: Handle darkMode value with block syntax (#16507) 2025-02-14 16:48:52 +01:00
migrate-postcss.ts Improve PostCSS migration (#15046) 2024-11-19 22:56:29 +01:00
migrate-prettier.ts Improve robustness when upgrading (#15038) 2024-11-19 14:29:51 +01:00
migrate.ts Fix handling of absolute config files in upgrade tool (#15927) 2025-01-28 12:42:30 +01:00
stylesheet.ts Resolve imports from CSS file (#15010) 2024-11-15 22:06:52 +01:00