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 ruleP2stack specificStack: css
cssz-indexmaintainability
Comment every z-index so stacking stays controllable
Always annotate z-index values with why/relative-to-what; uncommented z-indexes quickly become an unmanageable arms race.
PR: hegnar-web · org-mining-2026-06Created: Jun 17, 2026
Bad example
Old codecss
| 1 | .modal { z-index: 9999; } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codecss
| 1 | .modal { |
| 2 | /* above sticky header (100) and ad parallax (2) */ |
| 3 | z-index: 200; |
| 4 | } |
Explanation (EN)
Objašnjenje (HR)