I want to use Tailwind css in my React app. I have followed the documentation Tailwind installation and configured my React app to use Tailwind css. However, only some of the classes are working.
For example for background colour bg-gray-400
is working but bg-gray-900
will not work and will simply give white background. This is happening for several classes where most of the clsses are not working. I don't know why is it happening so.
Asked
Active
Viewed 319 times
0

enggPS
- 686
- 1
- 7
- 23
-
Can you check if class is present in output.css, if it is there add that file to App.tsx – Sachin Jagtap Dec 28 '21 at 12:26
-
did you made tailwind.config.js file? – Junaid Shaikh Dec 28 '21 at 12:59
-
@JunaidShaikh Yes, I have tailwind.config.js file. – enggPS Dec 28 '21 at 15:06
-
@SachinJagtap where is that output.css. Only App.css and index.css are present. – enggPS Dec 28 '21 at 15:08
-
@enggPS you must have used this cmd with tailwind: npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch ? – Sachin Jagtap Dec 29 '21 at 06:41