Earlier quoted context omitted.
Curious: which modern CSS solutions are you referring to?
For example, styled components, stylex etc.
Tailwind Isn't for Me
41–50 of 191 posts
Re: Tailwind Isn't for Me
#42Re: Tailwind Isn't for Me
#43I love tailwind. I strongly feel that most modern CSS solutions are massively overthought. In engineering we have bigger problems to solve than a key/value list that makes a div blue. Tailwind removes the thinking around CSS, naming, preprocessors etc etc, it just lets me write good CSS and focus on components and other engineering problems. I seem to be one of the few people who can read CSS properties horizontally…
My biggest issue with Tailwind is point #5 on the article: Tailwind encourages div/span-tag soup. Together with the class name soup my HTML becomes unreadable.
To be honest, I don't find that a problem. Most frontend development is done in a higher-order abstraction like React. For the most part, I don't read HTML and I don't write HTML. If you use the right level of composition, "div soup" should never really be a problem.
Re: Tailwind Isn't for Me
#44And having said that, when using Tailwind with some kind of component-centred framework, those classes will be local to a component anyway, which is exactly the same as some kind of custom component the author praises (that also needs styles within.)
Re: Tailwind Isn't for Me
#45- Do you care about how your html output looks? - I personally don't, just like I don't care about what my Webpack bundle looks like. Web standards will always be slower to evolve, which is why we build tooling on top.
- How do you think web components will be used? - I believe they will be used sparsely, only by libraries. But if you want to replace your frontend framework (I currently don't see why), Tailwind will not work.
We've opted to work with CSS Modules (which give you many of the Shadow-DOM advantages), but I would be lying if I didn't see the appeal of Tailwind every day. For me, it's the redundancy of having to give semantic names to elements that are already described by their React component names.
Tangentially, developers often are tempted to use classes for things that should be components. CSS classes must not be used for code reuse on a large scale, because CSS and HTML are bidirectionally coupled and you will end up search-replacing large sections of html because the design team wanted the text to align in a way that is somehow impossible without adding a div.
Re: Tailwind Isn't for Me
#46Tailwind is an abomination. Of course it's easier to use. Pressing the bold button in MS Word is easier than setting up styles etc, but one makes it easy to create an impossible to maintain mess that could have been made by a primary schooler, and one makes it possible to create a consistent style that looks professional. The only reason I think Tailwind is becoming popular now is it's exposing a bunch of things like…
You may not like its choices but saying it creates a mess has been the opposite of my experience.
One of the main pitfalls I have noticed no longer running into is that the structure tailwind encourages prevents issues with CSS selector specificity. As a result I’ve definitely noticed fewer instances of ‘!important’ in code review.
Re: Tailwind Isn't for Me
#47> We live in a world where custom elements (aka ) are fully supported and enabled by modern browsers. Don't we need to define the custom element using javascript first? All my knowledge about custom elements comes from this Mozilla doc: https://developer.mozilla.org/en-US/docs/Web/API/Web_compone... If custom elements is the way to go, it sounds like a lot of javascript and coding overhead that I have to take. Doesn'…
Re: Tailwind Isn't for Me
#48> We live in a world where custom elements (aka ) are fully supported and enabled by modern browsers. Don't we need to define the custom element using javascript first? All my knowledge about custom elements comes from this Mozilla doc: https://developer.mozilla.org/en-US/docs/Web/API/Web_compone... If custom elements is the way to go, it sounds like a lot of javascript and coding overhead that I have to take. Doesn'…
If all you want to do is prevent the "div/span-tag soup" as he calls it, you don't have to register anything, though. You can just write My header and style that using regular CSS à la ui-card { background-color: red; }.
Re: Tailwind Isn't for Me
#49I love tailwind. I strongly feel that most modern CSS solutions are massively overthought. In engineering we have bigger problems to solve than a key/value list that makes a div blue. Tailwind removes the thinking around CSS, naming, preprocessors etc etc, it just lets me write good CSS and focus on components and other engineering problems. I seem to be one of the few people who can read CSS properties horizontally…
Why not Styled Components? I've been using them for years now and I'm extremely productive. Tailwind on the other hand looks like a hellish nightmare, horizontal reading, proprietary syntax, no selector targeting of other components.
Submit
And you actually can target other components. There are lots of sibling selectors, including named groups:
Name
Re: Tailwind Isn't for Me
#50After a while of using Tailwind at work, I have started to love it. It it just so much more productive and I rarely need to step into css-land anymore. You still need to know and understand how CSS works in order to get the most out of Tailwind.
Tailwind is just like CSS but with shortcuts ready there for you to use.