• luciole (he/him)@beehaw.org
    link
    fedilink
    English
    arrow-up
    7
    ·
    1 year ago

    Tailwind only really makes sense in a precise use case that absolutely does not cover everything web based and I wish the makers where clearer about it.

    First off, the abstraction problem: since you give up on defining custom classes at length, elements will often receive more than a dozen utility classes. This is fine IF you use a component based framework like Vue and you break down your app into components with a small granularity.

    Second, the stylesheet problem: even minified and compressed, a stylesheet containing all of Tailwind’s utility classes is multiple Megabytes. The issue will not come from where you’d expect; downloading may take a while on the first page load, but all page loads will suffer from taking into account such a massive set of rules. Tree shaking makes this fine IF your content is already known at the moment of building the app.

    In the end I feel that Tailwind implements ideas on top of tech it is incompatible with and the abstractions it create are seriously leaking.

    • AnarchoYeasty@beehaw.org
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      Ok so use modern frameworks and tools that implement the tailwind plugin. Because if you are shipping the entire tailwind css that’s a developer problem not tailwinds. News flash: using a technology wrong doesn’t make the tech wrong.

      • luciole (he/him)@beehaw.org
        link
        fedilink
        English
        arrow-up
        5
        ·
        1 year ago

        News flash: your snark makes you an unpleasant person. Read my comment again. I said tree shaking fixes this… unless you don’t know what content you’ll display and what classes you’ll need at build time. Not all sites are static.

        • AnarchoYeasty@beehaw.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Unless you are going to be allowing custom html to be added the tooling is smart enough to figure out what possible classes your code can use. You’d have to do something dumb to not have the tools able to tell what components you are serving.

          • luciole (he/him)@beehaw.org
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            More generally, the more you have a flexible editor in the app, the worst it gets. This is the use case where I ran into trouble.

    • DH Clapp@beehaw.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      I don’t believe anyone who uses tailwind is shipping the whole thing with all of those megabytes of classes in production. It’s actually sort of hard to even do that on accident if you’re following a tutorial or their official docs.