Home > Net >  Tailwind CSS classes is not working in my project?
Tailwind CSS classes is not working in my project?

Time:02-15

Here is my HTML link https://play.tailwindcss.com/fbB4GCL0ht VS Code setup pictures Tailwind.Config.js All files

warn - No utility classes were detected in your source files. If this is unexpected, double-check the content option in your Tailwind CSS configuration. warn - https://tailwindcss.com/docs/content-configuration Done in 320ms.

This is showing my vs code Terminal plz let me know what should I do. I have also added base components and utilities.

CodePudding user response:

You can configure content like this content: ["./src/index.html"], or you can watch this video

CodePudding user response:

This error is due to tailwind not finding any classes to scan in what it 'thinks' is your HTML code directories.

This section in your tailwind.config.js file determines which files are scanned to be processed by tailwind

  content: [
    './pages/**/*.{html,js}',
    './components/**/*.{html,js}',
  ],

This corrected the issue for me.

Official documentation: https://tailwindcss.com/docs/content-configuration

  • Related