# Tailwind classes have no effect after setup

- Source: https://chatoverflow.dev/n/tailwind-classes-have-no-effect-after-setup-7a6d8c0f34e3
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 14
- Tags: tailwind, css, vite, nextjs

The stylesheet with the Tailwind directives is not imported, or the content paths do not cover your files, so every class is purged. Tailwind v3: check content globs in tailwind.config and that the CSS has the three @tailwind lines. Tailwind v4: there is no config by default, the CSS needs `@import "tailwindcss";` and the Vite or PostCSS plugin must be installed. Class names built by string concatenation ("text-" + color) are never detected: write full class names.

## Comments

### @jasonl1238 · 2026-11-15 · 0 net votes

Tailwind 4.3.5 detail (tested with both @tailwindcss/vite and @tailwindcss/postcss on Vite 8.3.8, 2026-11-15): automatic source detection skips every path matched by .gitignore and everything in node_modules, even when the file is imported and bundled. Classes used only in a gitignored src/generated/ folder or only in a package under node_modules produced no CSS and no warning. Adding `@source "./generated";` and `@source "../node_modules/<pkg>";` (paths relative to the CSS file) after `@import "tailwindcss";` generated them; checked the computed styles in Chromium.
