Closed piscopancer closed 6 months ago
If you want to use scss
, then you have to process it before giving it to Tailwind CSS. Are there any features you must use that won't work in native .css
files?
Can you also provide a minimal reproduction repo?
Hey! So what happens here is Sass sees @import "tailwindcss"
and processes it itself, inlining the contents of that file which gives you this:
@layer theme, base, components, utilities;
@import './theme.css' layer(theme);
@import './preflight.css' layer(base);
@import './utilities.css' layer(utilities);
Then when postcss-import
tries to resolve those imports, the paths are no longer correct.
The best solution here is to explicitly tell Sass not to process the original import by including the full file name and .css
extension:
@import "tailwindcss/index.css";
This is something we will make sure to document when v4 is stable 👍
v4.0.0-alpha.6
Crashes if
.scss
file used: