tailwindcss/packages
Philipp Spiess 0971eadd8f
Resolve theme keys when migrating JS config to CSS (#14675)
With the changes in #14672, it now becomes trivial to actually resolve
the config (while still retaining the reset behavior). This means that
we can now convert JS configs that use _functions_, e.g.:

```ts
import { type Config } from 'tailwindcss'

export default {
  theme: {
    extend: {
      colors: ({ colors }) => ({
        gray: colors.neutral,
      }),
    },
  },
} satisfies Config
```

This becomes:

```css
@import 'tailwindcss';

@theme {
  --color-gray-50: #fafafa;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-300: #d4d4d4;
  --color-gray-400: #a3a3a3;
  --color-gray-500: #737373;
  --color-gray-600: #525252;
  --color-gray-700: #404040;
  --color-gray-800: #262626;
  --color-gray-900: #171717;
  --color-gray-950: #0a0a0a;
}
```

---------

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2024-10-17 16:36:47 -04:00
..
@tailwindcss-cli Release v4.0.0-alpha.27 (#14671) 2024-10-15 10:28:34 +00:00
@tailwindcss-node Release v4.0.0-alpha.27 (#14671) 2024-10-15 10:28:34 +00:00
@tailwindcss-postcss Add first draft of new wide-gamut color palette (#14693) 2024-10-16 15:24:53 -04:00
@tailwindcss-standalone Release v4.0.0-alpha.27 (#14671) 2024-10-15 10:28:34 +00:00
@tailwindcss-upgrade Resolve theme keys when migrating JS config to CSS (#14675) 2024-10-17 16:36:47 -04:00
@tailwindcss-vite Release v4.0.0-alpha.27 (#14671) 2024-10-15 10:28:34 +00:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Resolve theme keys when migrating JS config to CSS (#14675) 2024-10-17 16:36:47 -04:00
tsconfig.base.json introduce v4 codebase 2024-03-05 14:29:15 +01:00