1

i currently have a react + ts app , i have my styles folder inside assets folder that is in src src/assets/styles/global.scss

the app is built with vite

I have tried all sorts of configurations and fixes to this problem that i have seen online, such as adding lines in context in tailwind.config file , requiring the files in postcss.config, i tried installing following the tailwind docs for both cli and postCSS

yet all i am getting are "Unknown At rules" in scss files and in css files

Please help me to fix this issue it will be very much appriciated =]

Rimon Sade
  • 11
  • 1
  • Does this answer your question? [How to use @apply directive of tailwind in any .scss file instead of only using it main tailwind file(in React)?](https://stackoverflow.com/questions/65532964/how-to-use-apply-directive-of-tailwind-in-any-scss-file-instead-of-only-using) – RubenSmn Feb 20 '23 at 18:37

1 Answers1

0

you can't use the tailwind at-rules straight from your sass files. what you need to do instead is:

@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";

If that does not solve your issue please share the tailwind config file with us or post a empty project that has the same stack in stackblitz that will be easier to look into it.

Ricardo Silva
  • 1,221
  • 9
  • 19