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 ruleP2project specificStack: SCSS/CSS
cssbrowser-compatlayoutflexbox
Prefer margins over CSS gap where broad browser support is required
When older-browser compatibility matters, lay out spacing with margins instead of the fl/grid `gap` property, which isn't supported everywhere.
PR: vinify-frontend · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codescss
| 1 | .filterTitle { |
| 2 | display: flex; |
| 3 | align-items: center; |
| 4 | gap: 11px; |
| 5 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .filterTitle { |
| 2 | display: flex; |
| 3 | align-items: center; |
| 4 | } |
| 5 | .filterTitle > * + * { |
| 6 | margin-left: 11px; |
| 7 | } |
Explanation (EN)
Objašnjenje (HR)