Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Treat an oversized component stylesheet as a signal to split or reuse
A very large single component stylesheet usually means the component should be broken into children or that shared/global styles are missing; reconsider the structure.
Bad example
| 1 | /* CreateNicknameContent.module.scss — 300+ lines re-implementing button hover, etc. */ |
Explanation (EN)
A stylesheet that recreates shared controls may indicate missing reuse or mixed component responsibilities.
Objašnjenje (HR)
Good example
| 1 | /* Reuse global button styles; keep the component stylesheet focused */ |
| 2 | .container { display: flex; gap: 12px; } |
Explanation (EN)
Objašnjenje (HR)
Notes (EN)
Treat an unusually large component stylesheet as a prompt to inspect repeated concepts, shared controls and coherent child responsibilities.
Exceptions / Tradeoffs (EN)
Line count alone is not a defect. Keep a cohesive stylesheet when splitting would add indirection without independent responsibilities.