tailwindcss/integrations
Philipp Spiess c0dd000c3c
Template migrations: Add automatic var injection codemods (#14526)
In v4, we're [removing automatic var
injection](https://github.com/tailwindlabs/tailwindcss/pull/13657)
(please refer to this PR for more detail as to why).

Automatic var injection made it so that if you have a candidate like
`bg-[--my-color]`, v3 would automatically wrap the content of the
arbitrary section with a `var(…)`, resulting in the same as typing
`bg-[var(--my-color)]`.

This PR adds codemods that go over various arbitrary fields and does the
`var(…)` injection for you. To be precise, we will add `var(…)` to:

- Modifiers, e.g.: `bg-red-500/[var(--my-opacity)]`
- Variants, e.g.:  `supports-[var(--test)]:flex`
- Arbitrary candidates, e.g.: `[color:var(--my-color)]`
- Arbitrary values for functional candidates, e.g.:
`bg-[var(--my-color)]`

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2024-10-01 13:23:24 +02:00
..
cli CLI: Use the right base when loading files from stdin (#14522) 2024-09-26 12:32:46 +02:00
postcss Resolve @import in core (#14446) 2024-09-23 17:05:55 +02:00
upgrade Template migrations: Add automatic var injection codemods (#14526) 2024-10-01 13:23:24 +02:00
vite Don't assert on mangled CSS names (#14397) 2024-09-11 17:37:36 +02:00
package.json Add integration test setup and tests for the Vite integration (#14089) 2024-08-02 11:50:49 +02:00
utils.ts ci: speedup windows integrations tests (#14485) 2024-09-20 15:59:18 -04:00