tailwindcss/packages
Robin Malfait b3fde17eac
Migrate negative arbitrary values to negative bare values (#18212)
This PR adds some improvements to the upgrade tool where it can now also
migrate negative arbitrary values to negative bare values.

We already had support for the positive version of this:
```diff
- mb-[32rem]
+ mb-128
```

But now it can also handle negative values:
```diff
- mb-[-32rem]
+ -mb-128
```

The only tricky part here is that we had to hoist the `-` sign. Before
this PR, we were actually generating `mb--128` and that is invalid so it
was thrown out.

## Test plan

1. Added a test to ensure that the negative values are correctly
transformed.
2025-06-03 08:53:58 +00:00
..
@tailwindcss-browser Release v4.1.8 (#18164) 2025-05-28 17:01:27 +02:00
@tailwindcss-cli Release v4.1.8 (#18164) 2025-05-28 17:01:27 +02:00
@tailwindcss-node Release v4.1.8 (#18164) 2025-05-28 17:01:27 +02:00
@tailwindcss-postcss Release v4.1.8 (#18164) 2025-05-28 17:01:27 +02:00
@tailwindcss-standalone Release v4.1.8 (#18164) 2025-05-28 17:01:27 +02:00
@tailwindcss-upgrade Migrate negative arbitrary values to negative bare values (#18212) 2025-06-03 08:53:58 +00:00
@tailwindcss-vite Release v4.1.8 (#18164) 2025-05-28 17:01:27 +02:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Release v4.1.8 (#18164) 2025-05-28 17:01:27 +02:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00