Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Do not mix a utility-CSS framework and SCSS in the same component
Keep styling ownership clear when utilities and SCSS coexist; avoid competing definitions for the same component state or property.
Bad example
| 1 | // component uses both a SCSS module and Tailwind classes |
| 2 | <div className={`${styles.modal} flex items-center p-4`} /> |
Explanation (EN)
Two competing sources for the same style can obscure which value wins.
Objašnjenje (HR)
Good example
| 1 | <div className={styles.modal} /> |
| 2 | /* modal.module.scss */ |
| 3 | .modal { display: flex; align-items: center; padding: 1rem; } |
Explanation (EN)
This example preserves the removed flex/alignment/spacing behavior under one styling owner; use the actual project spacing token.
Objašnjenje (HR)
Notes (EN)
Follow the component's established styling ownership and avoid defining the same property/state in both utilities and SCSS without an explicit precedence contract.
Exceptions / Tradeoffs (EN)
Tailwind supports custom CSS and staged migrations can intentionally mix approaches. Do not delete utility behavior unless equivalent styles are preserved in the chosen owner.