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
scsssassmodulesdeprecation
Prefer Sass @use over the deprecated @import
Sass @import is deprecated in favor of the module system @use; migrate to @use (on dart-sass/sass-embedded) to avoid global namespace leakage and future removal.
PR: hegnar-components · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codescss
| 1 | @import '../../styles/mixins/fonts'; |
| 2 | @import '../../scripts/colors'; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codescss
| 1 | @use '../../styles/mixins/fonts' as fonts; |
| 2 | @use '../../scripts/colors' as colors; |
Explanation (EN)
Objašnjenje (HR)