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
cssmaintainabilityvendororganization
Keep a scoped vendor reset pure; put your own fixes in a separate stylesheet
Adding custom fixes into a stylesheet meant to be a faithful scoped copy of a vendor reset risks them being lost on upgrade; isolate them.
PR: hegnar-web · org-mining-2026-06Created: Jun 17, 2026
Bad example
Old codecss
| 1 | /* preflight-localized.css (a scoped copy of a vendor reset) */ |
| 2 | em, i { font-style: italic; } /* our own fix lurking in here */ |
Explanation (EN)
Objašnjenje (HR)
Good example
New codecss
| 1 | /* preflight-localized.css stays a faithful scoped copy */ |
| 2 | /* preflight-localized-fixes.css */ |
| 3 | em, i { font-style: italic; } |
Explanation (EN)
Objašnjenje (HR)