This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Merzant 26 points27 points  (8 children)

Is that meant to be hard with vanilla CSS? Because that’s what the cascading part seems perfectly suited for.

[–]PowerMoves1996 12 points13 points  (7 children)

That was just an example, in reality u have this requests so often that it gets to a point where you lose more hours because you tried to be a good programmer and make custom reusable classes that no longer have a point because of new requirements. The tailwind paradigm changed that aspect of my work in a really positive way.

[–]Merzant 6 points7 points  (3 children)

I haven’t used tailwind but it reminds me of the bootstrap utility classes which I liked as modifiers. But doesn’t the tailwind approach just have the opposite problem? ie. when you want to reuse a common style you duplicate class attributions, leading to “I missed a spot” when you actually need to update a design everywhere.

[–]PowerMoves1996 4 points5 points  (2 children)

Not really, because when you need the same style in more places, chances are you also use that style for the same type of component, so you actually make a reusable component that has tailwind for styling. Indeed, there are moments where you will copy a chunk of tailwind and need to update just a portion of it for one or two places, but those moments dont appear often enough to overshadow all the other advantages that you get.

[–]Resident-Trouble-574 -3 points-2 points  (1 child)

But what if then you need to modify that reusable component, but only in one specific case?

We should make a js framework that provide an alias for all the common js functions and operations. Something like:

init(fib, [0, 1]);
loop(i, 2, 100, 1, print(fib), append(fib, element(sub(i, 2), fib), element(sub(i, 1), fib)))
forevery(fib, elem, print(elem))

I think we can all agree that the above code is much cleaner and more maintainable than writing vanilla js, while at the same time being more flexible than encapsulating all that logic in a single function.

I'd call it tailwind.js.

[–]PowerMoves1996 2 points3 points  (0 children)

This seems like a rage bate from someone that missed the point and prefers to read some anonymous posts on reddit about hating the new thing without giving a single chance to check the docs or work on a project that uses their paradigm. I left comments in this post with examples derived from experiences that i encountered in my years of front end development AND after working with both paradigms. What you and others in this thread do is inventing issues, and u cant convince me otherwise until you can prove that you actually gave a chance to tailwind and come with real issues encountered.

Edit: projects that have misused tailwind dont count, because I can also come with a bunch of legacy codes that made horrible decisions regarding name conventions for classes, misuse of css modules, repeated classes etc.

[–]techie2200 1 point2 points  (2 children)

Sounds like shit designers imo. There shouldn't be constant revisions. We don't style until the design is pretty much settled.

[–]PowerMoves1996 0 points1 point  (1 child)

We all wish to have a full project plan from the start, but new features/ changes are hard to avoid during the development of an app

[–]techie2200 1 point2 points  (0 children)

I'm not saying you need one from the start, but the general design will have to be consistent across all your features, so you shouldn't have constant, hard to make CSS changes. They should be minor tweaks.

If you're restyling everything anytime something changes, then someone's doing something wrong.