Performance: Button styles and variants
MEDIUM IMPACT
This affects page load speed and rendering performance by matching more CSS rules and increasing style complexity for buttons.
<button class="btn btn-primary btn-lg">Click me</button>
<button class="btn btn-primary btn-lg btn-block btn-outline-secondary">Click me</button>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Multiple button variant classes combined | 1 button element | 1 reflow | Medium paint cost due to complex styles | [X] Bad |
| Single button variant class used | 1 button element | 1 reflow | Low paint cost with simple styles | [OK] Good |