r/css • u/[deleted] • Sep 05 '25
Other tailwind is ass
Tailwind is absolutely awful.
I used bootstrap back in the day and I did eventually come around to realising how awful that was too.
Littering your HTML with crap like this:
<div class="mx-auto flex max-w-sm items-center gap-x-4 rounded-xl bg-white p-6 shadow-lg outline outline-black/5 dark:bg-slate-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10">
It's MASSIVELY inefficient - it's just lazy-ass utility first crud.
It may be super easy for people who cannot be bothered to learn CSS - so the lazy-ass bit - but for anyone who KNOWS css, it's fucking awful.
You have to learn an abstract construct cooked up by people who thought they knew what they were doing - who used bootstrap as a reference point.
Once upon a time, CSS developers who KNEW CSS figured that the bootstrap route was the bees-knees, the pinnacle of amazingness.
Then that house of cards fell on its ass - ridiculously hard to maintain, stupidly repetitive - throws the entire DRY methodology out the window. Horribly verbose. Actually incredibly restrictive.
This is from someone who drank the coolaid - heck, who was around BEFORE bootstrap, when this kind of flawed concept reared it's ugly head.
What you want is scoped css that is uglified, minified and tree shaken at build time - and what you want is a design system.
Something like this, in uncompiled code:
<Component atoms="{{ display: "flex", gap: "<variable>", backgroundColor: "<variable>"}} className={styles.WeCanHaveCustomCssToo}>...</Component>
When compiled down and treeshaken and uglified, it may end up being:
<div class="_16jmeqb13g _16jmeqb1bo _16klxqr15p"> ... </div>
It's scoped, on each build it's cache busted, it's hugely efficient and it's a pleasure to work with.
Most importantly, there's patten recognition in the compile process, where anything with the same atoms ends up with the same compiled classname, ditto for custom classes that could fall outside of a design system.
I'm not going to claim this concept is simple, it isn't, but it's for developers who understand CSS, who understand why CSS is important and who realise just how bloody awful tailwind is.
tailwind is ass.
58
u/CharlesCSchnieder Sep 05 '25
You literally can't use Tailwind if you don't know css. The vast majority of tailwind is one to one classes to properties.
→ More replies (16)15
u/brycedriesenga Sep 05 '25
To some extent, for sure. Not personally a Tailwind hater, though I do have my frustrations with it, but it does seem like it kinda makes the "cascading" part of CSS kind of irrelevant. This can throw me off because the cascading aspect is one of the best parts (though tricky to learn perhaps).
8
u/TheJase Sep 06 '25 edited Jan 19 '26
ring pot cagey tub carpenter expansion future tan narrow deliver
This post was mass deleted and anonymized with Redact
7
Sep 05 '25
Yeah this is true to some extent but itâs actually a feature. Once a project gets big enough with a lot of maintainers, cascading becomes a pain. Itâs not something you always want to rely on, better to be scoped or more specificity.
That being said when used correctly it can be really nice!
8
u/Jpasholk Sep 05 '25
How does it make cascading irrelevant?
9
u/brycedriesenga Sep 05 '25
Not completely, but it does shift styling from more global cascading rules that you think about architecturally to more local utility classes. You're not really relying on the cascade for your structure or overrides. So it's still there somewhat under the hood but it's a huge shift in terms of its role in your workflow when styling a web page
1
u/TheRNGuy Sep 07 '25
Cascading works for some properties, such as font or color, works in tailwind. You can put it on some parent tag, not on every nested tags.
Margin, padding, border, width etc do not cascade.
The same way as in normal css.
67
u/jezzgoodwin Sep 05 '25
There's a great article written by the author of Tailwind which explains why it is the way it is
https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
Written 8 years ago. Almost ancient history!
39
u/xegoba7006 Sep 05 '25
OP is just having a mental breakdown over the class names. He has no idea what tailwind is. Just sees classes and rants. Thatâs it.
→ More replies (7)16
u/freecodeio Sep 05 '25
Tailwind is just classes. It's not hard to come to the conclusion it's ass.
→ More replies (1)13
u/xegoba7006 Sep 05 '25
You can think whatever you want. Just donât use it.
OP still has no fucking idea what they are talking about.
→ More replies (1)4
u/hey-rob Sep 06 '25
I was today years old when I read that article, and I kind of went through a roller coaster of emotions with it. The article says that using extend is not recommended (arguable), and gives this example:
.article-preview { @extend .author-bio; }But that compiles to this, which IMO makes perfect sense, and it makes it easy to add and remove components as needed.
.author-bio, .article-preview { background-color: white; etc...; }But it doesn't even consider this and proceeds directly to claim separation of concerns is a straw man, which is some seriously tasty click-bait. But hey, he brings it home at the end with this:
For the sort of projects I work on, it's usually simpler to create a new .btn-purple class that bundles up those 7 utilities than it is to commit to templatizing every tiny widget on the site.
...but build them using utilities first
The reason I call the approach I take to CSS utility-first is because I try to build everything I can out of utilities, and only extract repeating patterns as they emerge.
That plus getting rid of the "blank canvas problem" is why tailwind is valuable.
19
u/neoqueto Sep 05 '25
Tailwind bad for solos.
Tailwind good for teams.
/EOT
Also fuck you for obfuscating classnames. I hate that as a user.
→ More replies (4)
106
u/alanbtg Sep 05 '25
Yeah, GameFreak should nerf it.
23
92
u/scar_reX Sep 05 '25
I'm not sure how tailwind helps you if you don't know css... is that about not knowing what css selectors to use?
→ More replies (1)97
u/mal73 Sep 05 '25
OP is acting like knowing CSS is some rare or difficult achievement and thatâs why people use Tailwind.
We use Tailwind at work because itâs great for consistent theming when working in dynamically changing Teams.
The fact you consider Tailwind an âabstract conceptâ makes me think you are the one that should freshen up on your CSS skills, OP.
24
Sep 05 '25
Knowing CSS well is akin to being a Navajo Codetalker during WW2. I donât know why so many people are opposed or incapable of utilizing it and doing it well. Iâve been helping more huge projects than I can count, simply because I know CSS extremely well.
24
u/bupkizz Sep 06 '25
The number of times Iâve replaced 300 lines of js with a single css selectorâŠâŠ..
→ More replies (5)→ More replies (7)15
u/scar_reX Sep 05 '25
Ikr... after knowing CSS, you can literally use anything the project requires... tailwind, bs, foundation, csx, sass... really easy adaptations.
5
1
→ More replies (8)1
5
u/t0rbenC0rtes Sep 05 '25
It will die out someday. CSS won't.
Hopefully.
→ More replies (1)1
Sep 05 '25
CSS will continue to improve so long as it's under the same level of stewardship it has maintained for decades - I actually need to go back and do some studying again to identify what is now considered ready for mainstream use - e.g. modal windows just as one small example.
It's exciting stuff and always has been.
HTML is amazing and all that - but it's kinda written in stone now, it's as old as Moses and component driven architecture via JS is the new sexy (until web assembly matures - which is a kettle of fish best to avoid right now, as it may never mature)
CSS however continues to evolve and improve and still be exciting and innovative.
66
u/xegoba7006 Sep 05 '25
LOL. The moment that you compare it with bootstrap, and that you think you donât need to know css to use it everyone will realize you have no idea what you are talking about.
Go and seek help. Control that fury. Or focus it on something else that doesnât make you look stupid.
15
u/vash513 Sep 05 '25
It's always the people who NEVER give tailwind an honest try who are the loudest. Every person I know who has ACTUALLY tried it in a project either liked it or at the very least respected it but didn't care for the syntax. The ones who don't actually bother to understand how it works are extremely vocal though.
3
u/lucid1014 Sep 06 '25
I use it at work, hate it. Literally always using the cms to add custom classes / code.
→ More replies (4)2
u/East_Lychee5335 Sep 07 '25
I was skeptical when I first saw the massive amount of classes. I was convinced when I noticed I never have to organize massive css files ever again. OP is insufferable.
→ More replies (1)1
u/AWetAndFloppyNoodle Sep 08 '25
Used it for years because I had to, really tried - hated it ÂŻ_(ă)_/ÂŻ
6
4
Sep 05 '25
Yeah weird to compare it to bootstrap IMO, completely different tool, especially to Bootstrap v3/4
5
u/etTuPlutus Sep 05 '25
I don't see how it isn't nearly identical to bootstrap's style utilities? You can even find lookup tables for translating the same rules between the two. What am I missing?
4
1
u/prettyflyforawifi- Sep 09 '25
And then puts react with obfuscated class names on a pedestal, what a rollercoaster post
1
u/IndigoGynoid Sep 06 '25 edited Sep 06 '25
Very Happy Gilmore of you to tell someone to control themselves and right after say they look stupid.
→ More replies (2)1
u/Rocket_Scientist2 Sep 06 '25
I've gotten flack for shipping bootstrap for the above reasons. I've been slinging bootstrap utils since 2010! Seeing this stuff is my "full circle" moment.
→ More replies (2)
16
u/T_O_beats Sep 05 '25
Itâs meant to be used with components. You write it once and likely never look at it again. Everyone complains about this but if this is an issue youâre not using it correctly.
3
1
u/Embostan Sep 08 '25
That's an issue. It goes against the idea of a design system.
→ More replies (8)
7
u/Latter-Assistant9635 Sep 05 '25
Itâs crazy that the amount of people that think they can use tailwind without knowing css is huge. I lose respect for them everytime I see a post like this. Bootstrap does shit for you without you knowing css. Not tailwind. Most of tailwind is basically shorter css syntax
I rather see posts that people complaint tailwind is long ass class name thatâs hard tinread than this stupid belief of tailwind = no need to learn css
7
7
u/theycallmethelord Sep 05 '25
I get the frustration. That giant soup of classes doesnât look maintainable when you first see it, and coming from a CSS background it feels like throwing away everything you already know.
The difference is that Tailwind isnât really trying to be âbetter CSSâ. Itâs solving a workflow problem. Teams donât agree on naming conventions, components get styled three different ways, and before you know it youâve got 8 shades of blue in the stylesheet. Utilities dodge that by making every choice explicit in markup. Itâs noisy, but it keeps people from drifting.
Youâre right though, the bloat is real. Reading a dense Tailwind div isnât fun, and design systems built on top of raw utilities often turn into a mess. What Iâve seen work is treating utilities as scaffolding, not the final structure. Use them early to move fast, then start abstracting into components or tokens once patterns harden. That way you get the speed benefit without locking yourself into unreadable markup forever.
Itâs basically the same balance in Figma: variables and tokens for the base, utilities when you need speed, and components or system rules once you know what should live longer. Without that step back, you end up with either utility chaos or a rigid old-school framework again.
11
Sep 05 '25
Cool rant, but Tailwind isnât Bootstrap 2.0, itâs atomic CSS with JIT compilation, purge-by-default, and design tokens baked into the build. Youâre bragging about compiling scoped CSS into hashed classnames as if Tailwind isnât already doing cache-busted, tree-shaken builds out of the box except with an ecosystem and community around it. Calling Tailwind lazy is like saying React is lazy because people donât write vanilla JS itâs not laziness, itâs abstraction. The only real âassâ here is pretending that verbose, handwritten CSS scales better than utilities designed for modern component-driven UIs.
28
u/maqisha Sep 05 '25
Bros solution to tailwind is to make tailwind, but worse.
1
u/PaleFault124 Sep 07 '25
Isn't that always the case. It's always some dude, saying: <technology X> is bad, just use plain js/css/html, to built it from the ground up, but worse.
14
u/janpaul74 Sep 05 '25 edited Sep 06 '25
The example you gave is the exact reason why I like tailwind. To each its own I guess. Waiting for the exact same post next week đđ»
17
u/hyrumwhite Sep 05 '25
I have a thorough understanding of CSS and I like tailwind. You can generally get around the massive class list by setting sane defaults in the base css layer provided by TW and by using components, which is how TW is intended to be used.Â
With some exceptions I rarely have more than 4 TW classes on a given element/component.Â
3
u/AK30195 Sep 05 '25
Yes, on smaller personal projects Iâve been using the base, component and utility layers to keep all the tailwind in css files. I just put my own class names in the html and use the component layer to apply the tailwind utility classes to each of my classes.
5
5
u/kamphare Sep 05 '25
I respect your opinion đđ» but I think using DRY as an argument against tailwind is really missing the point. Holding on to old concepts like this is a mindset issue that keeps you from seeing modern more fluent solutions.
5
u/smick Sep 05 '25
Yeah man, tailwind is ass, I agree. Iâve done a few projects with tailwind and really tried to buy into it, but all it really did was make my views extra long and complicated.
5
u/Potential_Status_728 Sep 05 '25
Yep, started using Nextjs the other day and css modules seems way cleaner to me than using tailwind.
5
u/adamwhitley Sep 06 '25
The big feature of CSS is the cascade. You want rule inheritance for uniformity across the app and tailwind completely breaks that. It was made for devs who string together multiple !important flags because theyâre too lazy or incapable of doing things the right way.
5
22
u/CrawlToYourDoom Sep 05 '25 edited Sep 05 '25
Awww, someone has reached the peak of the Bell curve again.
1
9
u/sovok Sep 05 '25
Building your whole site with Tailwind is madness, if youâre not making a prototype or are using a component framework (and even there you have scoped CSS).
But the concept of utility classes is pretty neat, for one-off tweaks to elements. I built myself a small subset of Tailwind in SASS, write my layout in CSS and sprinkle a few mb-2 or max-md:pb-30 in there, when just this element needs a little nudging to fit the design. Works well for boutique sites with unique elements.
2
1
u/Deadpool9491 Sep 05 '25
Se criar com HTML eståtico vai ser ruim, mas o Tailwind é pensado para ser usado com bibliotecas como React, pois assim o código não vai ter repetição no código-fonte, apenas no HTML gerado.
2
Sep 05 '25
For me it's the fact that you need twMerge to use it.
People complain about the cascade and inheritance but those are super powers in CSS. Tailwind throws all of that out and when you need it you have to fight around it.
It's also great how some of the best, most powerful CSS features are actively painful to use in Tailwind. For example, relative colors and grid (especially named grids) are just a pain in Tailwind.
It definitely has a place. If you're doing a Saas app with very little art direction or customization then yeah it's fine. But people act like it's the answer to everything and there are things it's actively bad for.
You just need to choose the right tool for the job.
→ More replies (4)
16
u/MrMaverick82 Sep 05 '25
By now it should be a canned response, but hey, here I go again:
I maintain 4 large codebases for a huge international company. 3 of those 4 codebases use tailwind. 1 doesnât.
Guess which one is the most difficult to maintain.
→ More replies (9)
16
u/armahillo Sep 05 '25
The two things I dislike about it the most are that it further conflates the presentation layer with the content layer, and that learning to be a good Tailwind user does not translate to learning how to be a good CSS user.
6
2
u/Zealousideal_Bat_490 Sep 06 '25
Exactly! HTML is for what something âisâ. CSS is for what something looks like.
→ More replies (2)1
u/obeythelobster Sep 06 '25
Front end is always so messy. Personally, I gave up, I don't care that it mixes presentation with content because it is modular, that is, related things are in the same place. This is also the react philosophy I guess
1
4
4
u/creaturefeature16 Sep 05 '25
I didn't like TW until I started writing applications in React/Svelte/Vue etc.. Then it started to be a LOT more useful. I'd never use it for a website, though.
4
u/manys Sep 05 '25
Div-itis is now class name-itis, all for people with little or no sense of semantics.
1
u/TheRNGuy Sep 07 '25
Those are different unrelated things. Divitis is bad, and often because React devs don't know fragments exist (but other time not to refactor component, write new small component instead)
Tailwind is not bad.
→ More replies (2)
10
u/underdoeg Sep 05 '25
sounds a bit clickbaity to call it ass. for me it is a useful tool depending on the project. i can write css. i appreciate tailwind because i know exactly what it does under the hood. it also helps to provide a standard when working on a project with multiple people and makes it easier to change things like colors or spacing afterwards without having to develop your own mini framework. Â
4
u/zaceno Sep 05 '25
I only very briefly toyed with tailwind and kinda had the same reaction as OP. Been trying to listen to arguments for it, and Iâve noticed that one comes up a lot, that it is easy to change a color across across a project. I donât think I get it because it sounds like people are saying to search and replace every mention of âbg-red-50â with âbg-blue-200â for example. That honestly doesnât sound very robust as a practice but I assume I must be missing something?
3
u/underdoeg Sep 05 '25
yes. you can override the base variables for font, color, spacing etc. so you define a different red for red-50 without changing the class names. i usually define my own colors. like primary, error, warning for example. you can also change them dynamically and provide different themes. nothing you couldnt do without tailwind, its just quicker.Â
2
2
u/dgreensp Sep 06 '25
It is frustrating that all the comments in favor of Tailwind have very low information content and/or are personal attacks.
Tailwind seems like someone said, âHow about if instead of color: red, you just used a class color-red, and instead of padding: 1px, you just wrote padding-1 or somethingâ and of course that immediate brings up a dozen questions about how to make that a remotely reasonable or usable idea, and I guess there are answers for all of them, but it still doesnât quite make sense to me.
I think part of the answer is that the values (like colors and lengths) can be constants you define rather than just literals. And Tailwind I guess parses your code and tries to find the strings you are using.
10
u/Mark__78L Sep 05 '25
I still wonder why people say tailwind is for people who don't know css Man, do you realise tailwind is css? You need to know what flex grid padding etc is to use tailwind I like both simple css and tailwind, each has their own usecases If I'm writing a reusable blade component tailwind is very useful because html and css is within a single file - quick to edit both
6
Sep 05 '25
For people that really donât know what theyâre talking about honestly. This guys has â30 years in the gameâ and makes a write up about Taikwind with the assessment of a Junior. lol. I doubt he has had to build anything at scale and maintain with a team for a long time.
7
7
7
6
u/leavethisearth Sep 05 '25
I like to be able to write shadow-sm and have a shadow than remembering the syntax for it and hand crafting a drop shadow.
3
u/tuple32 Sep 05 '25
I donât know whose theory is right. But Iâm 100% sure that there will be something new that will take over tailwind
1
u/re_designed Sep 07 '25
I quite like openprops css variable aspect oriented css. Doesnât bloat the html will all the utility class names.
3
u/TheJase Sep 06 '25 edited Jan 19 '26
ad hoc ripe thumb cows nutty shaggy retire jar obtainable afterthought
This post was mass deleted and anonymized with Redact
2
u/simonraynor Sep 06 '25
Yeah I'm not really a Tailwind fan (at least, the stuff at my new job is making me question its purpose) but it's way better than most of the other "clever" solutions the FE community has come up with. My problems with TW are around how it gets implemented, problems with stuff like css-in-js go much deeper. At least TW is mostly just classes at the end of the day
5
u/back-stabbath Sep 05 '25
I wouldnât use it for a personal project, but with a large-enough team or codebase, I find it the least-bad option. It works because itâs âdumbâ. Any system which encourages devs to start smartly wiring JS style objects/props together seems to evolve into nightmare fuel
5
u/CharacterOtherwise77 Sep 05 '25
Just because you use Tailwind doesn't mean you have to do everything with Tailwind.
I would use it for structure and spacing but I avoid using the typography and effects because a bespoke Design System is simple enough to have class based.
It also forces a consistency for those things, which is essential when you ever want to scale or refactor.
Your example is just so exhaustively TW you hid everything in TW.
1
u/Evla03 Sep 06 '25
You can still just add that to your tw-config too though?
1
u/CharacterOtherwise77 Sep 06 '25
You definitely can, and TW config is the first place to look if you are planning to scale.
4
2
2
u/Old-Radio9022 Sep 05 '25
I haven't used tailwind, my background was in bootstrap and then USWDS as work projects would dictate. These days I use custom classes for my elements and then just scss tools like extend to apply the framework classes to my project. It really seems to be the best of both worlds; clean html on the front end and clearly defined elements on the backend stylesheets, all driven by a variable set.
CSS is really evolving though with actual variables and logic now supported in major browsers which makes most of what these tools do a moot point.
On the other hand I can take a style guide for one project and migrate it to another in an afternoon which really streamlines the whole process.
2
2
u/Glum_Cheesecake9859 Sep 06 '25
Read the manual for TW4. You can create variants, custom classes using @apply with all that gunk inside it. And use the single class in your code.Â
2
u/simonraynor Sep 06 '25
But at that point why bother with TW, given that sass does that anyway? Is it just for rapid prototyping/consistency?
2
2
u/Katastos Sep 06 '25
I do hate it. I hate the fact that people don't want to learn basic CSS and prefer this unmaintainable way of writing HTML. A lot of tailwind lovers are people that really don't care about the frontend either because they mostly work on the backend or because they do not want to learn CSS.
CSS could seem weird at first because it's not a programming language (great Mozilla video here https://youtu.be/aHUtMbJw8iA?si=p3jGIpUVXcU4ODr6) , but if you realise what are the main 4 layout algorithms that rule it it becomes pretty easy (it's a really mental model shift. More about this in this excellent post https://www.joshwcomeau.com/css/understanding-layout-algorithms/ )
2
u/Electro-Grunge Sep 06 '25
I just write my css classes as I normally do and use @apply (even if it makes ppl mad) with Vue components.Â
Makes life easy for me and can scope.Â
2
u/zambizzi Sep 06 '25
I agree. Itâs lazy, hideous, and sloppy. I guess being an old man coder, I still just prefer to write the code. I like keeping my skills sharp and being in control of my output.
3
3
u/paceaux Sep 05 '25
I think Tailwind is good for use-cases which I"m yet to encounter in my day job.
Tailwind does not work when the goal is to make reusable markup. It just doesn't. For that, it's ass.
I build front-ends for content management systems and for web apps/sites that consume from CMS.
I'm writing templates that will be used in many different contexts. My markup needs few classes that do many things and enable a change of presentation of content with a handful or less of classes.
Tailwind forcing me to add dozens of single-responsibility classes to markup is incredibly unhelpful when I have content that has different presentations. It means I have to sift through each class that needs to change under a specific condition. That's terrible.
But also: quit assuming styles need to be scoped from the start; the cascade is fine
I'm getting really tired of folks acting like the cascade is a problem. It's not. Use it to your advantage.
Just look at the fucking AmericaByDesign website (which is written with Tailwind). If you remove one unnecessary span wrapped around every word, use an id instead of a data- attribute, and move a single chunk of inline styles, you would cut the size of the HTML in half. I did a whole writeup.
That's a classic case of: Use the cascade, bro.
But for what it's worth... that fucking website didn't need Tailwind at all. It needed someone whose head was not in their ass.
Only scope a style for one-off cases and embedded stuff
If no other design element is going to use a style, go ahead and scope it however it pleases you.
If you're bringing in a third-party unit, definitely scope that style so that those styles don't break your UI (YouTube videos come to mind).
This is where I think Tailwind or whatever scoping pattern is fine. This is also where I generally give web apps a pass for using Tailwind; if you don't have to represent that markup, do what tickles your fancy.
In the name of the sweet Saint Fuck of Cascadia: Separate your concerns
3
u/Time-Refrigerator769 Sep 05 '25
I have a hard time understanding what problem it solves, if its a large codebase we would use a component library anyway, which comes (in most cases anyway) with its own theming and standard styles. Why would i want to add another layer on top that which, considering defaults are taken care of, basically just adds a bunch of inline utility classes. If i have to build anything more complicated with css than adding three-four css properties, thats when im into pseudo selector territory and thats not going in the template anyway ? Im open to being proved wrong but it really just seems like another dependency to me.
4
4
u/bluespacecolombo Sep 05 '25
Tell me youâre a junior swe without telling me youâre a junior swe.
3
0
Sep 05 '25
I'm not the first by any stretch to post this kinda thing, I'm not the smartest, I'm an asshat myself a lot of the time, but you can do some searching and learning and stuff to grok why tailwind is ass.
Here's just one:
https://nuejs.org/blog/tailwind-misinformation-engine/
Knock yourself out, fill your boots, go out there and learn why tailwind is ass.
Or do the opposite - go and learn why tailwind is gold on the ceiling - I actually don't give a fuck.
1
u/WillDanceForGp Sep 06 '25
Why are you so mad bro, do you need to show me on the doll where tailwind touched you?
3
2
u/Psychological_War9 Sep 05 '25
I haven't been this happy reading a reddit thread before, I thought it was just me that felt this way!
2
u/official_jgf Sep 05 '25
all css frameworks are ass.
css is not that damn complicated. dev tools makes it easy even.
no need for all the bs
→ More replies (2)
2
u/codernaut85 Sep 05 '25
Itâs CSS for people who canât be bothered to learn CSS but also donât want to have to admit to using inline style tags.
2
1
u/Deadpool9491 Sep 05 '25
Se vocĂȘ estiver usando sĂł HTML estĂĄtico, o Tailwind pode parecer ruim. Mas se usar bibliotecas como React, por exemplo, ele Ă© muito mais Ăștil do que CSS puro ou mĂłdulos CSS, porque, como vocĂȘ jĂĄ estĂĄ criando um componente reutilizĂĄvel, nĂŁo faz sentindo criar uma classe CSS para usar somente uma vez e ficar alternando entre arquivos .tsx e .css.
AlĂ©m disso, o Tailwind jĂĄ segue boas prĂĄticas de design, com tamanhos de fonte e espaçamentos proporcionais (seguindo a regra dos mĂșltiplos de 4 e 8). As cores desde o Tailwind 4 usam oklch (que garantem melhor contraste e consistĂȘncia), sĂŁo facilmente configurĂĄveis e possuem suporte a diferentes nĂveis de transparĂȘncia, por exemplo, bg-primary/40 (aplica no background a cor da variĂĄvel --primary: oklab(44.296% -0.0895 0.02437) com 40% de transparĂȘncia).
O Tailwind tambĂ©m ajuda a criar designs responsivos com menos linhas de cĂłdigo, pois ele jĂĄ possui breakpoints (como sm:, md:, 3xl:, max-md:, etc) sem precisar criar vĂĄrios @ media (width >= 48rem){...}. E tambĂ©m tem o dark: para aplicar um estilo no tema escuro (equivalente a @ media (prefers-color-scheme: dark){...}. Sem falar de classes como sr-only (faz o texto ser "invisĂvel" mas mantido para leitores de tela), animate-spin (Ăștil nos Ăcones de carregamento), space-x-* e space-y-* (permitem criar um espaçamento horizontal e vertical entre os filhos sem precisar criar uma flexbox), divide-x e divide-y (adiciona um divisor entre os elementos, etc.
O Tailwind tambĂ©m, durante o build, gera um arquivo CSS contendo apenas as classes que vocĂȘ utilizou nos seus arquivos, o que resulta um arquivo final extremamente pequeno e otimizado.
Sem falar que muitas bibliotecas, como Shadcn e HeroUI, utilizam o Tailwind como base para criar componentes responsivos, otimizados e com tema facilmente personalizĂĄvel.
1
u/sunsetRz Sep 05 '25
I want to share a change in my perspective regarding my behavior.
As a PHP developer, I used to belittle WordPress too much and hated it. But once I entered deeper into it, I began to love it. I realized it was a huge time saver and a perfect fit for clients who needed websites quickly, and it did an amazing job. I ended up loving it.
The same happened with Tailwind CSS. I didnât like it much at first, but I saw how effective it was, especially for team work.
Since then, I have completely changed my perspective. I no longer hate any framework, library, or programming language. It all depends on how, when, and where you use it.
By embracing this mindset, Iâve shifted my perspective entirely. Now, I simply learn and use whatever tool best fits the specific project.
1
1
u/stormalize Sep 05 '25
What you want is scoped css that is uglified, minified and tree shaken at build time
If you are really building something that needs to be embedded or otherwise mixed with truly external code then yes you may need scoped styles like that, however
and what you want is a design system.
If you have any sort of design system or project where you are in control of the entire page, you may not even need all that. Embrace the platform, no build steps or dependencies.
Also really good additional reads:
https://jordanbrennan.hashnode.dev/global-css-and-design-systems
Creating a design system that assumes it could be used in a context where other competing design languages exist, i.e. conflicting CSS, is a major over-correction. That isn't to say some apps don't ever become a patchwork of differing styles, because unfortunately, they do. If a design system needs to support such an unintended situation, then highly-contained components make sense. However, that is not only a rare situation but a universally rejected one. Architecting a design system based on that rare potentiality should be avoided.
https://jordanbrennan.hashnode.dev/web-component-styles-are-mostly-encapsulated-without-shadow-dom
Global CSS is not to be feared. In the past, bad practices led teams to believe the way out was through framework's and their proprietary CSS-in-JS solutions. Custom Elements, or Custom Elements with a Shadow DOM to be precise, offer the same encapsulation without the costs of those dependencies. What's even better when full on Web Components are not needed, is using the power of a prefixed custom HTML tag to quickly and easily and safely define component styles using global CSS.
1
1
u/NullVoidXNilMission Sep 05 '25
I see it as a short cut. At first i really didn't like the idea then i tried it and I still feel a certain way about how many classes someone adds to an element. I believe you can use a single class and mix in tailwind classesÂ
1
1
u/Cautious_Variation_5 Sep 05 '25
Youâre comparing apples with oranges. Tailwind is totally different from Bootstrap. They are meant for different purposes
1
u/WeasyV Sep 06 '25
Honestly I had a similar opinion. I used bootstrap plenty back in the day. I'm a huge fan of css modules. Localized styles with a strong separation of concerns. I hated ugly HTML littered with the same classes over and over.
But I gave it a try anyway and now it's my default. It's so much faster to write code with tailwind. No context switching and with some basic macros you can whip up a component and style it at the same time. It's so much easier to share between projects. It's more consistent, too. Sure, you're css looks good to you. My CSS looks perfect to me. But let's face it, I hate the way you wrote your CSS and you hate mine. Tailwind is simply better for collaborating.
Finally, one of the more modern benefits is from LLM's. I prototype and use AI to do a basic first draft. It's easier to modify and take slices of AI generated code written with CSS in JS.
1
1
u/bored-and-here Sep 06 '25
m8. its designed for react dynamic component building and to ensure that you dont have to hunt through heaps of files. its the difference between corporate art and making a marble sculpture.
its about time efficiency and easier team collaboration of course it comes with trade off. and of course it looks shit if you measure it by none of its strengths
1
Sep 06 '25
it's good that you can make adjustments right in the html/jsx itself, but it does markup look messy. I think the real benefit is that its' standardized and custom CSS files can turn into disasters pretty quick.
1
u/Mesqo Sep 06 '25
Take my vote, can't stress enough hitter important design system and css isolation is.
Can you elaborate about atoms though? I believe it's done kind of design system implementation? What exactly?
1
1
u/Puzzleheaded-Work903 Sep 06 '25
abstract construct that tousands of people use and get used to... its not perfect but thats for any desgin system
funnily - htmls and css is abstraction too and you are right sir!
1
u/Jebble Sep 06 '25
I've never needed to "learn" tailwind, because it's that simple and logical. I have also never forgotten how to write CSS. Terrible bait.
1
1
u/johnlewisdesign Sep 06 '25
Well, some of the largest companies in the world would not be happy at the redability of class names like _16jmeqb13g _16jmeqb1bo _16klxqr15p
But you do you
1
u/martinbean Sep 06 '25
My bugbear with Tailwind is, itâs all utility classes so yes, if you just use it as is you end up with mark-up stuffed full of classes specific to the design at the time, and if you want to change your design, youâve got to un-pick all those instances and every spot you copy-and-pasted the same combination of classes.
Whatâs the alternative? Bundling groups (for things like buttons etc) into âcomponentsâ. But then that just ends up taking you back to Bootstrap territory, the very thing Tailwind acolytes users laugh and hate on. âUrgh, Bootstrap! Utility classes are far superior to component-based classes!â
Funnily enough, another criticism Tailwind users had about Bootstrap was that âall sites look the sameâ. Well, Iâm sorry, but itâs 2025 and I can spot a site using the default Tailwind font stack and colour palette a mile off too đ
1
u/Natural_Tea484 Sep 06 '25
Littering your HTML with crap like this:
<div class="mx-auto flex max-w-sm items-center gap-x-4 rounded-xl bg-white p-6 shadow-lg outline outline-black/5 dark:bg-slate-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10">
It's MASSIVELY inefficient - it's just lazy-ass utility first crud.
Have you heard of CSS preprocessors which allow you to combine several classes into one?
1
u/_dekoorc Sep 06 '25
I agree with almost everything you said. Besides the bootstrap bs.
What? We built our own stuff, not customized some library.
1
u/paladin_bih Sep 06 '25
Been a css purist for years. Switched to tailwind 2 years ago. Works fine for me 90% of the time. Still write custom classes when needed. No biggy at all. Canât relate.
1
u/FoundationActive8290 Sep 06 '25
for me its not for everyone and not for every type of projects. i work on both wordpress and laravel/vue and hereâs my thought on it based on my teamâs setup coming from a bootstrap also. we use bootstrap heavily before on both wp & laravel. when we started switching to inertia.js, were pushed to use vue as a front-end and we still use bootstrap that time. as time goes by, we realized modifying ui using js framework state is becoming a challenge for us. so we tried using tailwind in one of our small new project and it clicked! working on front-end becomes easier for everyone without too much css overhead. on the other hand, we switched to tailwind on our wordpress projects and we find it more fiendly working on custom designs and not being too bootstrap-ish. we have so much control on the ui without getting stuck on options and random css classes.
my point here is, tailwind is not for everything but could be for everything. if your website ui can be done using bootstrap because it has UI kit, good and use it. but in our experience, for web apps that are using js frontend framework ie vue, react, svelte - tailwind works best for us. we dont worry about too long class names coz we work on a component-based setup and we love headless ui framework ie radix/reka - sprinkle it with tailwind and its just perfect
1
1
1
u/Sualocin Sep 06 '25
So as someone interested in Web Dev and plays a lot of Cyberpunk 2077, I thought this was related to the latter and you'd get torn apart alive if you posted something like this in that sub. Tailwind is basically a required perk to them. I'll see myself out
1
u/sadarisu Sep 06 '25
You may not like to use it but you could try to understand why and when it makes sense to use it. I personally prefer to write my own CSS (especially with sass) because a lot of my frontend assignments don't take utility first frameworks into account, meaning I'd have to end up extending tailwind, which defeats its purpose. Bootstrap never worked for me for this same reason.
Now, a lot of the web uses very similar visual elements that can easily be replicated with tailwind or stuff like shadcn. You do spend less time writing css if that's the case so it's a good tool to know if you're not given a lot of time to complete a page or a website.
It's also more maintainable long term because developers come and go and companies rarely give us enough time to properly document our work.
So yeah, although I personally prefer writing my own CSS, I'm open to use other things if it makes more sense.
1
1
1
1
1
u/TurtlePowerBottom Sep 06 '25
I donât really care about the other stuff but itâs kool-aid not coolaid
1
u/Martinoqom Sep 06 '25
Perfect timing for my answer on why I hate tailwind: https://www.reddit.com/r/tailwindcss/comments/1n4kn5s/comment/nbtexfg/
1
u/noisyboy Sep 06 '25
If you are styling something that has many instances and you want them to be uniform, use an css/sass setup. E.g., all labels must have this shadow. If your styling affects this one component, just inline using tailwind, adding a class to the css file just for that isn't worth it.Â
1
u/blocsonic Sep 06 '25
Beware the mindless minions who will be incoming with the defense of the trash that is tailwind. đ
1
u/A-Pseudo-Random-User Sep 07 '25
Yes it is just sooo performant and so maintainable. If you donât get this is dripping with sarcasm Iâm telling you I donât mean either of those things.
Not gonna lie you can indeed leverage it and get some nice results but trust me youâll hate your life if you have to actually maintain this over the long haul. The super fun part is that when you want to make it performant and maintainable you end up right back to a near native CSS style using their tools and invented approach. Itâs just like React reinventing things for legit reasons and then people jumping in without pondering what those reasons even were and assuming they even have such problems. Itâs a full on cargo cult most of the time in modern dev⊠AI cough cough.
The particular cargo culting around Tailwind truly is quite frustrating. Yes Iâm old and Iâve seen plenty of dreamweaver inline styles. In short Iâve seen this all before and just believing Adam Waltham knows better than the CSS group at the W3C and all the browser platform engineers is honestly kind of offensive. Respect people who put literal decades into the web platform. He doesnât have their background at all. He does however know how to do social media and heâs also a pretty darn good designer. Yet those are two different things than having a deep focus on CSS and how it plays in the web platform.
Btw I absolutely am not saying some of you havenât found value in this tech but consider people including me also find value gobbling down McDonaldâs too but I donât claim thatâs healthy or haute cuisine. Popularity != correct or quality that is a simple logical fallacy.
So maybe letâs stop the Tailwind glazing and hating and consider maybe just maybe there is a fair bit of nuance here. At the very least it doesnât hurt to deeply know about what is being abstracted (raw css) as opposed to just taking things on faith because popularity (tailwind).
Ultimately we should always just use what we want that fits the job, but we shouldnât gloss over any downsides and absolutely stop all market might makes right argument nonsense or are we becoming faschi in absolutely everything now?
1
1
1
u/LassassinN Sep 07 '25
Sure buddy. Keep using raw css while i ship shit 10x faster with react and tw
1
u/MrCrunchwrap Sep 07 '25
I know people who have worked on design systems professionally for years - working very very closely with basically every CSS solution out there. And guess what? They fucking love Tailwind.
1
1
1
u/DOG-ZILLA Sep 07 '25
You donât know what youâre talking about. You make several false/misinformed statements.Â
Youâre also assuming that youâll never work with developers who suck at CSS and will literally rot your codebase into a brittle hell. Tailwind is good for large teams that iterate around a centralised design system. Itâs almost impossible to deliver CSS with Tailwind that isnât being used. It also prevents people going rogue or enforcing their own style and preferences.Â
If youâre on your own, go at it but TW is a Godsend for component-driven architecture that needs to remain consistent and adaptable as well as declarative within a team.
Tailwind IS CSS.Â
1
u/Lucsy3012 Sep 07 '25
I have been there and hated Tailwind for a long time. With time, I learned to appreciate it and don't want to miss it. I takes some time to get used to it but it can pay off. I still see the same issue with the classes, but most often it's not really a big concern for me since a lot can be build with smaller components that are very easy to grasp. It also helps that modern IDEs will show you duplicated Tailwind classes in case you missed something.
1
1
u/TheRNGuy Sep 07 '25
In React you see less code at same time. You just write a component and don't look at these classes again (if you need to change, you can easily change one or few classes)
And you can use visual editor with it.
And tell designer only to use styles from your tailwind config in Krita... or designer already uses it and will provide you a config.
Also, you can use both tailwind and normal css at same time. It's not only one or the other.
1
1
u/Hawkes75 Sep 07 '25
CSS-in-JS is just as bad and as cluttered-looking, unnecessary 99% of the time and throws separation of concerns out the window. Modules and/or component-scoped stylesheets are where it's at for me. I don't want to have to sift through a bunch of styling code to figure out what the actual component template and logic are doing.
1
1
1
1
u/Feeling_Photograph_5 Sep 08 '25
I want to hate it. I really do. But everything I build is in components, which all live in a component library, and it's nice to build those components all in one file each and never have to worry about mysterious interactions between them.
When I inevitably want to use my component library in a new project I just copy/paste. Easy.
So, I use Tailwind.
1
1
u/Xacius Sep 08 '25
imo tailwind was never meant to be the only CSS solution for an application. I find that it covers the common 80% of application development, primarily for layout CSS, consistent fonts, and text/icon/bg colors.
But for reusable components? fuck no. You're almost always better off with the abstraction you've mentioned, or CSS modules.
1
1
1
u/TelevisionKnown Sep 08 '25
Wow⊠it seems I like.. ass ? Youâre not supposed to use tailwind if it doesnât tingle you in the right spot. It surely works for me⊠itâs good for fast prototypes and for large scale apps. It ensures a consistent way (maybe not the best) to style your dom. It is easy to learn. Thatâs why it is everywhere. Just donât use it if you donât like it, but donât say itâs ass. Btw, Iâve been writing css among other things for the past 20 years :p
1
1
u/AWetAndFloppyNoodle Sep 08 '25
All my old colleagues loved tailwind because they weren't good at CSS so +1 for that. I hate it too. I do like utility functions once in awhile where all you need is to adjust padding or margin. But for anything else I swear by BEM SCSS. I'm not a fan of uglifying or scoping css however. I find it a huge plus to be able to debug by naming.
You have no clue what this is:
<div class="mx-auto flex max-w-sm items-center gap-x-4 rounded-xl bg-white p-6 shadow-lg outline outline-black/5 dark:bg-slate-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10">
but this is pretty self explanatory:
<div class="news-articles__article">
You CAN make custom classes in tailwind, but my experience is that people don't do it.
1
u/GoTeamLightningbolt Sep 08 '25
Tailwind is just reinvented inline styles and for some reason people thought it was a good idea.
1
u/andythetwig Sep 08 '25
Tailwind isnât just for developers. Itâs also for designers. Itâs a tokenised system for quickly communicating design decisions. Itâs not designed for elegance.
Itâs good for bootstrapping because you donât have to agree on a full suite of design variables (tokens) up front. Every tailwind based library or design system works in the same way, so if you get a new team together, youâre speaking the same token language immediately. You can start with one look and feel, and change it easily later.
Tailwind does not stop you changing to more specific and efficient classes later. The point is not engineering elegance, or efficiency- itâs usability of the tokens and speed to market.
1
1
1
1
1
1
u/_Invictuz Sep 09 '25
This post smells like something that wasÂ
cooked up by people who thought they knew what they were doing
1
u/Ah_Sean_art Sep 10 '25
Your two class names only differ in font-size; why not simply use two font size utility classes?
1
1
1
u/RetroAesthetic99 Sep 05 '25
I can see how Tailwind would be frustrating for people who don't interact with CSS much, but if you know CSS well and use it all the time Tailwind is just obviously so much better. I was a Tailwind skeptic at first, but now I literally wouldn't start a web project without it.
1
1
1
1
u/F1QA Sep 05 '25
See you at work Monday dude. Love from your friendly neighbourhood webp Tech Lead đ Thought the atoms looked familiar then saw your app router post. âItâs gotta be him!â â€ïž
-1
u/ninonanii Sep 05 '25
it's not good or bad - it's a tool. utility classes have their place and tailwind comes with a bunch of them out of the box with consistent naming.
there is usecases where it makes sense, and where it doesn't. it depends.
there is no need to be for or against it - just be aware that it exists, and if it seems useful for a specific project, use it.
you can write bad code with tailwind (as you showed) but you can also write bad code without it.
just kidding, it sucks and should have never been written.
→ More replies (1)
0
u/LoudAd1396 Sep 05 '25
Thank you! I always hated Bootstrap for the same reasons, and I've been resistant to tailwind. I assumed it would be exactly as you describe it. Pure CSS for the win!
-1
160
u/angrydeanerino Sep 05 '25 •
Time for one of these posts again I guess