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: SCSS / CSS Modules
scsscssnamingreadability
Keep SCSS class names short and nesting shallow
Avoid deeply nested SCSS selectors with long descriptive class names; flatten the structure and use concise, scoped class names.
PR: vinify-frontend · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codescss
| 1 | .container { |
| 2 | .heroSection { |
| 3 | .wineDetails { |
| 4 | .detailsHeader { |
| 5 | .wineNameProducerOrigin { |
| 6 | .wineNameText { color: red; } |
| 7 | } |
| 8 | } |
| 9 | } |
| 10 | } |
| 11 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .header { display: flex; } |
| 2 | .title { color: red; } |
| 3 | .meta { margin-top: 0.5rem; } |
Explanation (EN)
Objašnjenje (HR)