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
cssshorthandreadability
Use CSS shorthand for symmetric box values
Collapse separate padding/margin declarations into shorthand when the values are symmetric or zero on a side.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codescss
| 1 | .section { |
| 2 | padding-top: 16px; |
| 3 | padding-right: 16px; |
| 4 | padding-left: 16px; |
| 5 | padding-bottom: 0; |
| 6 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .section { |
| 2 | padding: rem-calc(16 16 0); |
| 3 | } |
Explanation (EN)
Objašnjenje (HR)