tailwindcss/packages/@tailwindcss-postcss/src
Philipp Spiess 225f3233b6
Enable URL rewriting for PostCSS (#16965)
Fixes #16636 

This PR enables URL rebasing for PostCSS. Furthermore it fixes an issue
where transitive imports rebased against the importer CSS file instead
of the input CSS file. While fixing this we noticed that this is also
broken in Vite right now and that our integration test swallowed that
when testing because it did not import any Tailwind CSS code and thus
was not considered a Tailwind file.

## Test plan

- Added regression integration tests
- Also validated it against the repro of
https://github.com/tailwindlabs/tailwindcss/issues/16962:
  
<img width="1149" alt="Screenshot 2025-03-05 at 16 41 01"
src="https://github.com/user-attachments/assets/85396659-d3d0-48c0-b1c7-6125ff8e73ac"
/>

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2025-03-07 12:18:10 +01:00
..
__snapshots__ Re-enable: Only expose used CSS variables (#16676) 2025-02-21 10:45:22 +01:00
fixtures/example-project Add @source support (#14078) 2024-08-07 16:38:44 +02:00
postcss-fix-relative-paths Postcss: Run plugin in Once hook (#15273) 2024-12-03 10:28:51 +01:00
ast.test.ts Use AST transformations in @tailwindcss/postcss (#15297) 2024-12-04 15:43:59 +01:00
ast.ts Use AST transformations in @tailwindcss/postcss (#15297) 2024-12-04 15:43:59 +01:00
index.cts Postcss: Bring back proper type exports (#14256) 2024-08-26 15:54:07 +02:00
index.test.ts Make @reference emit variable fallbacks instead of CSS variable declarations (#16774) 2025-02-25 11:36:43 +01:00
index.ts Enable URL rewriting for PostCSS (#16965) 2025-03-07 12:18:10 +01:00