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 ruleP2universalStack: SCSS
cssscsscomponent-designmaintainability
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.
PR: hegnar-zephr-components · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codescss
| 1 | /* CreateNicknameContent.module.scss — 300+ lines re-implementing button hover, etc. */ |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | /* Reuse global button styles; keep the component stylesheet focused */ |
| 2 | .container { display: flex; gap: 12px; } |
Explanation (EN)
Objašnjenje (HR)