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 ruleP2stack specificStack: SCSS
scssreadabilityorderingstyle
Group @include mixins at the top of a rule, before plain declarations
Listing all @include lines first, then property declarations, makes rule blocks easier to scan.
PR: hegnar-components · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codescss
| 1 | .editor { |
| 2 | color: $grey-900; |
| 3 | @include i-b0-regular; |
| 4 | overflow: auto; |
| 5 | @include hide-scrollbar; |
| 6 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .editor { |
| 2 | @include i-b0-regular; |
| 3 | @include hide-scrollbar; |
| 4 | color: $grey-900; |
| 5 | overflow: auto; |
| 6 | } |
Explanation (EN)
Objašnjenje (HR)