Class Detection (@source)

Detecting Classes in Source Files (@source)

Tailwind 5,202 reads your files as plain text, collects every token that could be a class (Under the Hood), and generates CSS for the ones it recognizes. Starting from the working directory it skips .gitignored paths, node_modules, binary files, CSS files and lock files. Nothing is executed, so bg-${color}-600 never matches; map props to complete strings such as { red: "bg-red-600", blue: "bg-blue-600" }. Steer detection from your stylesheet:

Controlling source detectionSass
@import "tailwindcss" source("../src");    /* base path; source(none) disables auto-detection */
@source "../node_modules/@acme/ui";          /* scan an ignored package built with Tailwind */
@source not "../src/legacy";                 /* skip a directory */
@source inline("{hover:,}bg-red-{50,{100..900..100},950}"); /* safelist 22 classes */

inline() brace-expands like a shell and replaces v3's safelist; @source not inline() blocks unwanted matches. A style missing after a build usually means an unscanned file or a constructed class name.