Performance: @use directive for imports
MEDIUM IMPACT
This affects CSS build time and runtime style calculation by managing how stylesheets are imported and scoped.
@use 'variables' as vars; .button { color: vars.$primary-color; }
@import 'variables'; @import 'variables'; .button { color: $primary-color; }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| @import repeated | N/A | N/A | High due to large CSS | [X] Bad |
| @use once with namespace | N/A | N/A | Lower due to smaller CSS | [OK] Good |