News for hackers. Stuff that matters.
Re:Why I don't like Tailwind CSS by shadowfaxRodeo on Thursday March 11, 2021 @08:02PM (#26431088)
The author didn't touch one of the biggest issues of Tailwind. It ignores the Cascade part of CSS.

Even after optimizing Tailwind. You still end up with way more css than you should have. Add all the classes in the HTML and you're sending users a massive amount of data.

Instead of writing:

    main > * + * {
      margin-top:1rem
    }

you write `mt-100` a thousand times.
Re:Why I don't like Tailwind CSS by criswell on Friday March 19, 2021 @09:04PM (#26519821)
There's `space-y-N` which does exactly this, `space-x-N` for horizontal.
Re:Why I don't like Tailwind CSS by Scooty on Thursday March 11, 2021 @10:39PM (#26431978)
What do you do with that snippet when you realize some elements arbitrarily need more or less spacing than others because the designer decided it looks better?

Repeating yourself isn't the end of the world, and on occasion DRY is worse (look up incidental duplication).

Re:Why I don't like Tailwind CSS by tvphan on Friday March 12, 2021 @03:51AM (#26433528)
Mate, there is a `space-y-1` helper class.