Diagnostic step 1
Identify patterns: search repository for template literal patterns and computed class strings (e.g., regex for `text-\${` or `\${color}-500`) and list all dynamic cases to decide per-case fix.
Generated Oct 13, 2026, 9:45:52 AM
Identify patterns: search repository for template literal patterns and computed class strings (e.g., regex for `text-\${` or `\${color}-500`) and list all dynamic cases to decide per-case fix.
Use safelist for true dynamic values: in tailwind.config.js add a safelist with a compact range (e.g., { pattern: /^text-(red|green|blue)-(100|200|300|400|500)$/ }) rather than enumerating every possible class to keep generated CSS minimal and reversible.
Replace dynamic assembly with deterministic mapping: convert constructs like `text-${color}-500` into a small lookup object mapping color names to class strings (e.g., const colorClass = { red: 'text-red-500' }[color]) so Tailwind sees literal class names.
Verify content globs and custom extractors: ensure tailwind.config.js content includes all app and component paths and that any custom extractor is not filtering valid tokens; run the Tailwind CLI content scan locally to preview which classes will be generated.
Add CI check: add a step in CI to run a Tailwind build and compare expected selectors (or critical CSS) so regressions from future refactors are caught early.