Performance: Small and compact tables
MEDIUM IMPACT
This affects page load speed and rendering performance by reducing DOM size and paint area for tables.
<table class="table table-sm"> <thead> <tr><th>Header 1</th><th>Header 2</th></tr> </thead> <tbody> <tr><td>Data 1</td><td>Data 2</td></tr> <tr><td>Data 3</td><td>Data 4</td></tr> </tbody> </table>
<table class="table"> <thead> <tr><th>Header 1</th><th>Header 2</th></tr> </thead> <tbody> <tr><td>Data 1</td><td>Data 2</td></tr> <tr><td>Data 3</td><td>Data 4</td></tr> </tbody> </table>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Default Bootstrap table | Minimal | 1 per table render | High due to large padding | [X] Bad |
| Bootstrap table with .table-sm | Minimal | 1 per table render | Lower due to reduced padding | [OK] Good |