tailwindcss/packages/@tailwindcss-postcss/src
Robin Malfait 0d5e2be312
Ensure we process Tailwind CSS features when using @reference (#16057)
This PR fixes an issue where if you only used `@reference` that we
didn't process Tailwind CSS features.

We have a 'quick bail check', in the PostCSS plugin to quickly bail if
we _konw_ that we don't need to handle any Tailwind CSS features. This
is useful in Next.js applications where every single CSS file will be
passed to the PostCSS plugin.

If you use custom font ins Next.js, each of those fonts will have a CSS
file as well.

Before we introduced `@reference`, we used `@import "tailwindcss"
reference`, which passed the bail check because `@import` was being
used. Now we have `@reference` which wasn't included in the list.

This is now solved.

Fixes: #16056


### Test plan

Added a failing test that is now failing after the fix.
2025-01-30 15:29:08 +00:00
..
__snapshots__ Add :host rule to @theme layer (#15975) 2025-01-29 17:20:29 +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 Ensure we process Tailwind CSS features when using @reference (#16057) 2025-01-30 15:29:08 +00:00
index.ts Ensure we process Tailwind CSS features when using @reference (#16057) 2025-01-30 15:29:08 +00:00