tailwindcss/packages
Robin Malfait 82034ec327
Migrate data theme keys (#18816)
This PR is similar to and a follow up of #18815, but this time to
migrate the `data` theme keys.

Let's imagine you have the following Tailwind CSS v3 configuration:
```ts
export default {
  content: ['./src/**/*.html'],
  theme: {
    extend: {
      data: {
        // Automatically handled by bare values
        foo: 'foo',
    //  ^^^   ^^^       ← same names

        // Not automatically handled by bare values
        bar: 'baz',
    //  ^^^   ^^^       ← different names

        // Completely custom
        checked: 'ui~="checked"',
      },
    },
  },
}
```

Then we would generate the following Tailwind CSS v4 CSS:

```css
@custom-variant data-bar (&[data-baz]);
@custom-variant data-checked (&[data-ui~="checked"]);
```

Notice how we didn't generate a custom variant for `data-foo` because
those are automatically handled by bare values.
2025-08-28 14:45:18 +00:00
..
@tailwindcss-browser Drop warning from browser build (#18732) 2025-08-14 12:20:19 -04:00
@tailwindcss-cli Prepare v4.1.12 release (#18728) 2025-08-14 14:35:49 +02:00
@tailwindcss-node Prepare v4.1.12 release (#18728) 2025-08-14 14:35:49 +02:00
@tailwindcss-postcss Prepare v4.1.12 release (#18728) 2025-08-14 14:35:49 +02:00
@tailwindcss-standalone Prepare v4.1.12 release (#18728) 2025-08-14 14:35:49 +02:00
@tailwindcss-upgrade Migrate data theme keys (#18816) 2025-08-28 14:45:18 +00:00
@tailwindcss-vite Prepare v4.1.12 release (#18728) 2025-08-14 14:35:49 +02:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Show suggestions for known matchVariant values (#18798) 2025-08-26 14:25:35 +00:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00