this post was submitted on 02 Aug 2023
66 points (100.0% liked)

Programming

13226 readers
1 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] luciole@beehaw.org 7 points 1 year ago (7 children)

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.

[โ€“] dhc02@beehaw.org 3 points 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.

load more comments (6 replies)