In my opinion the problem is that CSS apply styles and positioning to markup
Components have been a solved problem in desktop apps for decades
You have layout and styles applied to components positioned in the layout
What's really problematic is having a presentation layer that's split in layout and styles in the same context (CSS) while content and structure are both exposed in HTML
If we had layout in HTML and styling in CSS it would be easier to reason about it
HTML was born to give the document structure, layout is in the same league if you ask me, but then styles became the only way to lay out content, HTML lost its purpose of being the way to structure content in a meaningful way so you have the same HTML behaving diffentely with different layouts just because CSS can work on both of them
If footer meant "stuck at the foot of content no matter what the content is" we could have saved a lot of engineering hacks around making it reusable
Components have been a solved problem in desktop apps for decades
You have layout and styles applied to components positioned in the layout
What's really problematic is having a presentation layer that's split in layout and styles in the same context (CSS) while content and structure are both exposed in HTML
If we had layout in HTML and styling in CSS it would be easier to reason about it
HTML was born to give the document structure, layout is in the same league if you ask me, but then styles became the only way to lay out content, HTML lost its purpose of being the way to structure content in a meaningful way so you have the same HTML behaving diffentely with different layouts just because CSS can work on both of them
If footer meant "stuck at the foot of content no matter what the content is" we could have saved a lot of engineering hacks around making it reusable