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 ruleP2project specificStack: SCSS
csslayoutconsistency
Use width + margin auto for centered containers, consistently
Match the layout idiom used elsewhere (width + margin: 0 auto) instead of min-width when centering, to keep styling consistent across pages.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codescss
| 1 | .container { min-width: rem-calc(980); } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .container { width: rem-calc(980); margin: 0 auto; } |
Explanation (EN)
Objašnjenje (HR)