CSS is one of the places in web dev that never really reached consensus, even today. We might get WASM as the app platform of the web before this even happens.
WASM is more of the same exact issue... web devs inventing fragmentation and trying to make things low level again even though they have such a great platform that's already batteries included...
While I don't really like it myself, Tailwind is a good CSS framework for the age of component-based application design, where your JS / CSS / HTML lives in a single file, and your application-design won't change that heavily.
But when you want to redesign a whole site after the fact, or if you want to keep your component library logic & templates, and port it to a new system, Tailwind might be more trouble than it's worth.
It's just that... Atomic CSS has its benefits, BEM has its benefits, etc etc etc.
Why do you feel it's nonsense? I'm genuinely curios.
Personally I'm using Tailwind for 90% of the styling. If I keep repeating a certain combination of classes often, I'll group it with a custom class. (Edit: See colejohnson66's comment for an example)
Two advantages of tailwind that I didn't see before I started using it:
- It's often easier to find what I want in the tailwind documentation, and it comes with nice examples. MDN is great, but with Tailwind I get reasonable presets.
- TailwindUI: Saves me a lot of time and looks good without feeling as generic as bootstrap.
Perhaps I'm just old-fashioned but I prefer semantic classes.
I completely rewrote the CSS for my website and I did not need to touch the templates. An .error is an error and a . collapsible is a collapsible. Their exact style is not dictated by the markup.
I also like that it keeps the markup small and easy to read, because it's not peppered with CSS.
It also avoids situations where two widgets look different because I forgot to copy one class over. A .collapsible is a collapsible.
Tailwind is one of those polarizing topics where people either love it or hate it. I've used it at a few companies and I didn't care much for it, but I had coworkers who swore by it.
My gripe with Tailwind is the redundancy of class definitions across elements that clearly would benefit from "normal" CSS. If I have a <table> with a whole host of <td> elements, those repeated class definitions become quite tedious.
threatofrain|2 years ago
eternityforest|2 years ago
matheusmoreira|2 years ago
peebeebee|2 years ago
But when you want to redesign a whole site after the fact, or if you want to keep your component library logic & templates, and port it to a new system, Tailwind might be more trouble than it's worth.
It's just that... Atomic CSS has its benefits, BEM has its benefits, etc etc etc.
unknown|2 years ago
[deleted]
unknown|2 years ago
[deleted]
BasilPH|2 years ago
Personally I'm using Tailwind for 90% of the styling. If I keep repeating a certain combination of classes often, I'll group it with a custom class. (Edit: See colejohnson66's comment for an example)
Two advantages of tailwind that I didn't see before I started using it:
- It's often easier to find what I want in the tailwind documentation, and it comes with nice examples. MDN is great, but with Tailwind I get reasonable presets.
- TailwindUI: Saves me a lot of time and looks good without feeling as generic as bootstrap.
nicbou|2 years ago
I completely rewrote the CSS for my website and I did not need to touch the templates. An .error is an error and a . collapsible is a collapsible. Their exact style is not dictated by the markup.
I also like that it keeps the markup small and easy to read, because it's not peppered with CSS.
It also avoids situations where two widgets look different because I forgot to copy one class over. A .collapsible is a collapsible.
naet|2 years ago
hipadev23|2 years ago
satvikpendem|2 years ago
haydenchambers|2 years ago
[deleted]