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/SCSS
cssmobileviewportresponsive
Prefer 100dvh over 100vh for full-viewport heights
Use dynamic viewport units (dvh) with a @supports fallback so layouts account for mobile browser UI that shows/hides.
PR: hegnar-components · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codescss
| 1 | .panel { height: calc(100vh - 116px); } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .panel { |
| 2 | height: calc(100vh - 116px); |
| 3 | @supports (height: 100dvh) { |
| 4 | height: calc(100dvh - 116px); |
| 5 | } |
| 6 | } |
Explanation (EN)
Objašnjenje (HR)