Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
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.
Bad example
| 1 | .root { /* shared by tvguide AND articles widgets */ } |
Explanation (EN)
A feature-specific global override can constrain another feature's styling unexpectedly.
Objašnjenje (HR)
Good example
| 1 | // pageFoundation/globalStyles for pages; widgetFoundation for widgets |
Explanation (EN)
Objašnjenje (HR)
Notes (EN)
Check whether a shared stylesheet represents an intentional design-system contract or accidentally couples otherwise independent feature releases.
Exceptions / Tradeoffs (EN)
Shared reset/tokens/components can be deliberate architecture. Split only the unrelated feature-specific behavior, preserving the shared contract where useful.