Performance: Table color variants
LOW IMPACT
This affects page load speed and rendering performance by adding CSS classes that change table row or cell colors.
<table class="table"> <tbody> <tr class="table-danger"><td>Row 1</td></tr> <tr class="table-success"><td>Row 2</td></tr> </tbody> </table>
<table class="table"> <tbody> <tr style="background-color: #f8d7da;"><td>Row 1</td></tr> <tr style="background-color: #d4edda;"><td>Row 2</td></tr> </tbody> </table>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Inline styles per row | Minimal | 0 | High (multiple paint calls) | [X] Bad |
| Bootstrap color classes | Minimal | 0 | Low (shared styles) | [OK] Good |