When CSS doesn't work the way you expect, you should break it with JavaScript.

Why not bring back spacer GIFs?

Josh advocates for a new separation of concerns, based on compartmentalized technologies (buttons, lists, etc) as opposed to HTML, CSS, JavaScript.

Amusingly, the problem he describes would be fixed with some simple CSS, an understanding of the cascade and inheritance, and an hour or so figuring out how margins really work.

Just like Josh doesn’t understand CSS, not everyone understands JavaScript. It takes a lot of learning to get good at JavaScript. And shockingly, the same is true for CSS.

If you want to have CSS experts who can fix your problems, you can’t put the CSS in your JavaScript.

That’s why there’s separation of concerns, old-school style: HTML, CSS, JavaScript.

That’s why Josh’s proposed separation of concerns, based on components (button, list, media) flat out doesn’t work. This separation of concerns relies on a front-end expert who can keep up with three different and rapidly evolving technologies. It doesn’t allow for expertise in any one area.

Thus, you wind up with a JavaScript expert who doesn’t understand CSS and wonders why no one else (in his sphere) does either.

I am amused that the ultimate solution to Josh’s problem is to go with the old-school separation of concerns and talking to a CSS expert, rather than attempting to bend the web to his will using JavaScript alone.

Jen Kramer @jen4web