tailwindcss/packages
Robin Malfait 498f9ff003
Migrate bare values to named values (#18000)
This PR improves the upgrade tool by also migrating bare values to named
values defined in the `@theme`.

Recently we shipped some updates dat allowed us to migrate arbitrary
values (with square brackets), but we didn't migrate bare values yet.

That means that in this example:
```html
<div class="aspect-[16/9]"></div>
<div class="aspect-16/9"></div>
```

We migrated this to:
```html
<div class="aspect-video"></div>
<div class="aspect-16/9"></div>
```

With this change, we will also try and migrate the bare value to a named
value. So this example:
```html
<div class="aspect-[16/9]"></div>
<div class="aspect-16/9"></div>
```

Now becomes:
```html
<div class="aspect-video"></div>
<div class="aspect-video"></div>
```

## Test plan

1. Added unit tests for the new functionality.
2. Ran this on a local project


Before:
<img width="432" alt="image"
src="https://github.com/user-attachments/assets/ce1adfbd-7be1-4062-bea5-66368f748e44"
/>

After:
<img width="382" alt="image"
src="https://github.com/user-attachments/assets/a385c94c-4e4c-4e1c-ac73-680c56ac4081"
/>
2025-05-13 17:35:11 +02:00
..
@tailwindcss-browser Prepare v4.1.6 release (#17951) 2025-05-09 13:39:18 +00:00
@tailwindcss-cli Prepare v4.1.6 release (#17951) 2025-05-09 13:39:18 +00:00
@tailwindcss-node Prepare v4.1.6 release (#17951) 2025-05-09 13:39:18 +00:00
@tailwindcss-postcss Update dedent 1.5.3 → 1.6.0 (minor) (#17965) 2025-05-10 13:21:48 +02:00
@tailwindcss-standalone Upgrade bun to 1.2.13 (#17981) 2025-05-12 15:17:19 +02:00
@tailwindcss-upgrade Migrate bare values to named values (#18000) 2025-05-13 17:35:11 +02:00
@tailwindcss-vite Prepare v4.1.6 release (#17951) 2025-05-09 13:39:18 +00:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Upgrade lightningcss to 1.30.0 (#17979) 2025-05-12 15:49:18 +02:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00