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
cssconsistencysizing
Round pixel values and avoid decimals in CSS
Use whole-number pixel dimensions instead of stray decimals to keep sizing consistent across the codebase.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codecss
| 1 | .bar { width: 307.5px; } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codecss
| 1 | .bar { width: 307px; } |
Explanation (EN)
Objašnjenje (HR)