Remix.run Logo
antran22 3 hours ago

> Tailwind instead pushes the dev into a CSS-first approach. You think about the Tailwind classes you want, and then throw yet-another-div into the DOM just to have an element to hang your classes on.

To be fair plopping a `div` everywhere started way before Tailwind. I blame React and the mess that is CSS in JS for this.

evilduck 3 hours ago | parent | next [-]

Divitis was a thing long before React came along. It was a common solution to styling problems even in the jQuery/Dojo days. Getting stuff to look similar across IE6 and FF before CSS3 relied heavily on divs.

ncphillips 2 hours ago | parent | prev [-]

It did for sure. And Tailwind absolutely doesn’t need to be done this way. I think this is a correlation-not-causation issue

TonyAlicea10 13 minutes ago | parent [-]

I disagree. With Tailwind you think in nested classes which ergonomically encourages “I need a div for this class”.

Very similar in to early React where every component had to return a single real parent element (now you can return a fragment) so people chose div.