Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
frontend ruleP1stack specificStack: css
tailwindconfigurationbuildcss
Add new files using utility classes to the framework's content config
When introducing a new file that uses Tailwind (or similar JIT utility) classes, add its path to the content/purge config so styles aren't stripped.
PR: hegnar-web · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codejavascript
| 1 | // new VotingBanner.tsx uses Tailwind classes |
| 2 | // tailwind.config content does not include its path -> classes purged |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejavascript
| 1 | content: [ |
| 2 | './src/server/components/**/*.{ts,tsx}', |
| 3 | './src/server/components/VotingBanner.tsx', |
| 4 | ], |
Explanation (EN)
Objašnjenje (HR)