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
namingcssreadability
Name CSS classes by their intent, not a vague modifier
A class like `lineModified` is unclear; name it after what condition it represents, e.g. `noLogo`.
PR: hegnar-components · org-mining-deep-2026-06Created: Jun 17, 2026
Bad example
Old codecss
| 1 | .lineModified { /* modified how? */ left: 16px; } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codecss
| 1 | .noLogo { /* applied when there is no ticker logo */ left: 16px; } |
Explanation (EN)
Objašnjenje (HR)