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
cssbrowser-compatibilityprogressive-enhancement
Verify browser compatibility before relying on a CSS feature
Before depending on a CSS feature (e.g. calc, certain pseudo-elements) check support against your target browsers, and consider a more compatible approach when support is thin.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codescss
| 1 | .col { width: calc(100% - 20px); } // unchecked on target mobile browsers |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | // confirmed calc support on all target browsers, or use flex/grid as fallback |
| 2 | .col { width: calc(100% - 20px); } |
Explanation (EN)
Objašnjenje (HR)