Replies: 1 comment
-
The reason we offer the imports as an alternative if because the CSS spec is strict about From https://github.com/postcss/postcss-import:
What this means is that this CSS doesn't work: @tailwind base;
@import "some-custom-css";
@tailwind components;
@tailind utilities; So we offer the imports as a way to workaround this so that you can write this and not get errors from @import "tailwindcss/base";
@import "some-custom-css";
@import "tailwindcss/components";
@import "tailwindcss/utilities"; If you look at the source of those files you can see all they do is include the relevant https://unpkg.com/browse/tailwindcss@3.4.4/utilities.css /* tailwindcss/utilities.css */
@tailwind utilities; This is all outlined in detail in our documentation on build-time imports: https://tailwindcss.com/docs/using-with-preprocessors#build-time-imports |
Beta Was this translation helpful? Give feedback.
-
What does "avoid issues when importing any of your own additional files" means? What issues? Please improve the documentation, thanks.
Why create the
@tailwind
directive instead of usingpostcss-import
directly?Beta Was this translation helpful? Give feedback.
All reactions