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
cssroot-causemaintainability
Fix the root cause rather than masking a symptom
Hiding overflowing items with nth-child display:none, or papering over a layout bug, masks the real problem; restructure the underlying layout/logic instead.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codecss
| 1 | &:nth-child(12), &:nth-child(13) { display: none; } // hide the overflow |
Explanation (EN)
Objašnjenje (HR)
Good example
New codecss
| 1 | // fix the grid sizing / data limit so only the intended items render |
Explanation (EN)
Objašnjenje (HR)