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
cssfontsfallbacktypography
Always provide a generic font-family fallback
End every font-family stack with a generic fallback (e.g. sans-serif) so text renders sensibly before the custom font loads or if it fails.
PR: hegnar-zephr-components · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codecss
| 1 | .name { font-family: 'Inter'; } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codecss
| 1 | .name { font-family: 'Inter', sans-serif; } |
Explanation (EN)
Objašnjenje (HR)