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: css
cssseparation-of-concernsstyling
Express layout dimensions in CSS, not inline in JS
Prefer setting sizes via stylesheets/class names over hardcoding width/height numbers in component code.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codejsx
| 1 | <SearchForm width={320} height={48} /> |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejsx
| 1 | <SearchForm className={styles.searchForm} /> // dimensions in .searchForm |
Explanation (EN)
Objašnjenje (HR)