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 / React
csslayoutspacingrefactor
Fix layout spacing at its source rather than adding override props
When padding is doubled or wrong, remove the offending rule from the component that owns it instead of layering a new prop/override; verify other pages still look right.
PR: hegnar-forum-web · org-mining-3rd-2026-06Created: Jun 18, 2026
Bad example
Old codetsx
| 1 | <TabPanel disableInlinePadding /> // new prop to cancel padding it shouldn't add |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .tabPanel { padding: rem-calc(20 0 16); } /* remove the inline padding at source */ |
Explanation (EN)
Objašnjenje (HR)