Loading...
Loading...
Tailwind CSS classes (like bg-blue-500) are in the HTML but nothing changes in the browser.This happens when Tailwind's Just-In-Time (JIT) engine doesn't 'see' your file. Tailwind only generates the CSS for classes it finds in the files listed in your config. If your file isn't in that list, no CSS is generated for those classes.
Make sure all your source files are included in the content array.
// tailwind.config.js
module.exports = {
content: [
"./src/**/*.{js,ts,jsx,tsx}", // Check if this matches your structure
"./app/**/*.{js,ts,jsx,tsx}",
],
// ...
}If using Next.js or Vite, ensure tailwindcss is in your postcss.config.js.
// postcss.config.js
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}Sometimes the old CSS is cached. Use Ctrl + F5 (Cmd + Shift + R on Mac) to force a refresh.
Fix this error faster with our free tool