↗ Elise Hein: 'Fighting inter-component HTML bloat'
6 Apr 2023 via elisehe.in
As I'm refactoring an existing design system, this article by Elise Hein came quit timely.
We consider HTML to be cheap, but wrapping div
s in div
s in div
s 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