Performance: @extend directive
MEDIUM IMPACT
This affects CSS bundle size and browser rendering performance by duplicating or merging selectors.
.btn-primary, .btn-secondary { color: blue; padding: 1rem; }
.btn-primary { color: blue; padding: 1rem; } .btn-secondary { color: blue; padding: 1rem; }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Repeated styles without @extend | No extra DOM operations | 0 | Low | [X] Bad |
| @extend with complex selectors | No extra DOM operations | 0 | Medium due to complex style calculation | [!] OK |
| Manual selector grouping | No extra DOM operations | 0 | Low | [OK] Good |