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: css
scssvariablesconsistencytheming
Use SCSS variables consistently rather than ad-hoc CSS custom properties
When the codebase standardizes on SCSS variables, keep using them instead of introducing one-off CSS custom properties with hardcoded fallbacks.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codescss
| 1 | .label { |
| 2 | color: var(--black, #070707); |
| 3 | border-top: 1px solid var(--gray-100, #e6e9ed); |
| 4 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .label { |
| 2 | color: $black; |
| 3 | border-top: rem-calc(1) solid $grey-100; |
| 4 | } |
Explanation (EN)
Objašnjenje (HR)