10 ms·
My experience with Tailwind detractors has been of people starting with their opinion that Tailwind is bad and then working backwards to come up with almost ent
by methodical 3y ago
My experience with Tailwind detractors has been of people starting with their opinion that Tailwind is bad and then working backwards to come up with almost entirely arbitrary and contrived reasons to justify that conclusion. I truly can't believe that anybody who has completely learned Tailwind could posit the argument that Tailwind isn't any faster than writing pure CSS void of emotional bias. Whenever I see someone make such a statement, I can tell it's more of a propaganda piece than a piece meant to spawn logical thought.
To not leave this comment with simply a hand-waving disregard of this post, let me say this: Nobody who knows what they are doing writes Tailwind styles as long as the ones presented in this post, nobody uses arbitrary styles or custom styles as many times as is presented in this post, and yes (in a shock to nobody)- it is quicker to write "m-2" than write ".[my unique, non conflicting class name (usually incredibly arbitrary to avoid conflicts)]{ margin: 10px };" and then implement that in code. Usually, when you try to write pure CSS efficiently, you just end up basically duplicating Tailwind by creating utility classes anyways, except minus all of the actual perks of JIT.
At this point in time, if you say that you see no benefit in using Tailwind, you are being obtuse.
- paradox460 3y ago> Nobody who knows what they are doing writes Tailwind styles as long as the ones presented in this post That sounds a lot like no-true-scotsman. The big image of the overstyled checkbox is from Netlify's admin dashboard.
- methodical 3y agoMeh, probably is an example of a no-true-scotsman. A better way to word it would be to say that not many of the Tailwind codebases I've seen have styles of that length, except for on choice elements where most of the classes are overwriting default styling (such as on inputs). You literally defended CSS in a similar way in your post "The cascade, selector chaining (see above), and specificity are all very powerful tools. If you misunderstand them, yeah you can cut yourself. Just like if you don't use a saw properly you can cut yourself.". In the same sense, just because some people write super long Tailwind classes doesn't mean that you can extrapolate that to all Tailwind classes.
- Exuma 3y agoExactly. This entire article is written like they're just TRYING to come up with reasons it is bad. "m-2 doesnt mean that always"? What are you talking about, of course does....... unless you change it in your config, in which case you intentionally changed it. How is this even an argument?
- lawn 3y agoWhy is "writing it as fast as possible" the ultimate goal? Maintaining and debugging code (yes even styling) takes much more time than writing it in the first place. Which is why readability is so important, and why Tailwind's approach of big unreadable blobs is so jarring (it doesn't just make the styling hard to read, it also makes the surrounding markup hard to read).
- methodical 3y agoTailwind is both faster to write and more readable. Instead of having to read up and down and cross reference both inherited and local classes to find the active styles on an element I can look at a short string of instantly recognizable and easy to read utility classes right there on the element directly, as opposed to somewhere else in the file (or potentially in another file altogether).
- adamrezich 3y agofor someone who has never used tailwind before, comments like yours read as being emotionally defensive of a tool you like to use. it's fine that you like to use said tool, but sentences like this > Whenever I see someone make such a statement, I can tell it's more of a propaganda piece than a piece meant to spawn logical thought. come across as pretty absurd. on whose behalf is the author supposedly writing said propaganda for? Big CSS? the guerilla antitailwindist movement? the irony is you accuse the author of being emotionally biased, yet claim objectivity yourself, while defending said supposed objectivity with language that is far from dispassionate. this may resonate with other tailwind enthusiasts like yourself, but to the outside observer who has no investment (emotional or otherwise) in being either for or against tailwind, it comes across as far more overemotional (to the point of mild absurdity) than the author did in TFA. this ends up having the opposite of what I must presume to be your intended outcome: it leads to the outside observer, reading these comments with mild interest to determine whether or not tailwind is perhaps worth another look since they checked it out last time, to be dissuaded from investigating this tool you like to use any further.
- deleted 3y ago[deleted]
- jakelazaroff 3y ago> I truly can't believe that anybody who has completely learned Tailwind could posit the argument that Tailwind isn't any faster than writing pure CSS void of emotional bias. Whenever I see someone make such a statement, I can tell it's more of a propaganda piece than a piece meant to spawn logical thought. I truly mean no disrespect by this, but have you considered that other people might be better than you at writing CSS? Because what you are describing is absolutely not a universal experience.
- methodical 3y agoI have certainly considered that, but I don't understand how writing out ".[my unique, non conflicting class name (usually incredibly arbitrary to avoid conflicts)]{ margin: 8px };" and then referencing that class in the code is quicker than writing "m-2"?
- deleted 3y ago[deleted]
- jakelazaroff 3y agoNot sure if you meant it to be, but "my unique, non conflicting class name (usually incredibly arbitrary to avoid conflicts)" is kind of a straw man; there are multiple ways to prevent that problem, such as CSS modules or web components. Anyway, here's one common scenario for me: I need the same set of styles on multiple elements. With Tailwind, it goes one of a few ways: - I duplicate the styles on all of the elements - I abstract the data into some sort of loop and add the styles to the single element in the loop body - I create a component, add the styles to that component and use that in place of each element All of the above gets harder if there are existing elements that share some of the same styles, because I now need to identify the subset of styles that must be extracted. It's even worse if it happens across different tag names, because I then need to introduce branching into my abstraction. Meanwhile, with CSS, I just give each element the same class name and add those styles to that class name. I think this is what the author is getting at by saying Tailwind is far to the "write-only" side of the spectrum. There's no argument from me that just writing `m-2` is faster than adding a class name to the element, going to my CSS file and writing `.classname { margin: 0.5rem; }`. But that's only the first part of the process.