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: css
cssmixinsdryscss
Use existing mixins instead of reimplementing common patterns
Reach for a shared mixin (e.g. text ellipsis) instead of hand-writing the same set of declarations, and promote a useful local mixin to the shared mixins file.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codescss
| 1 | .name { |
| 2 | white-space: nowrap; |
| 3 | overflow: hidden; |
| 4 | text-overflow: ellipsis; |
| 5 | } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | .name { @include ml-ellipsis; } |
Explanation (EN)
Objašnjenje (HR)