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
cssoverflowlayoutux
Avoid nested scroll containers (scroll inside scroll)
Adding overflow to a parent that already has a scrolling child creates a confusing double scrollbar; scope scrolling to the one region that needs it.
PR: hegnar-components · org-mining-deep-2026-06Created: Jun 17, 2026
Bad example
Old codecss
| 1 | .host { overflow-y: auto; } /* and the inner <ul> already scrolls -> scroll inside scroll */ |
Explanation (EN)
Objašnjenje (HR)
Good example
New codecss
| 1 | .host { display: flex; flex-direction: column; } |
| 2 | .header { flex: 0 0 auto; } |
| 3 | .list { flex: 1; overflow-y: auto; } /* only the list scrolls */ |
Explanation (EN)
Objašnjenje (HR)