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 ruleP1universalStack: css
architecturecssdecouplingmodularity
Keep independent features from depending on each other's styles
Separate apps/features shouldn't be forced to share a global base class or stylesheet; give each its own base so they can evolve and use different libraries independently.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codescss
| 1 | .root { /* shared by tvguide AND articles widgets */ } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | // pageFoundation/globalStyles for pages; widgetFoundation for widgets |
Explanation (EN)
Objašnjenje (HR)