As I'm refactoring an existing design system, this article by Elise Hein came quit timely.
We consider HTML to be cheap, but wrapping
divs comes with a cost that slowly creeps up.
Why avoid extra wrapper elements?
- Bloated html hurts performance
- Redundant elements can create problems with accessibility
- Redundant elements can break styling
- Deeply nested dom trees are annoying to work with