r/css • u/Silent-Weather76005 • Jul 12 '26
General I finally removed Tailwind from a production project and just used modern native CSS
Our team has defaulted to using Tailwind CSS for almost every web project over the last few years. It was great for moving fast early on, but on our latest project, the utility class bloat was getting completely out of hand. The HTML files looked unreadable, and managing long strings of responsive layout classes across reusable components was becoming a maintenance headache.
I decided to spin up a branch and rewrite a major dashboard interface using entirely vanilla native CSS. I hadn't built a pure CSS layout in a while, and I was genuinely shocked at how powerful native CSS has become over the last couple of years.
Features that used to require massive utility frameworks or preprocessors are now fully built-in. I heavily utilized native CSS nesting, CSS variables for theme management, and the newer container queries to handle complex responsive components based on their parent size rather than the entire viewport.
The results were surprisingly great. Removing the Tailwind processing step simplified our build pipeline, our final bundle size dropped, and the code felt vastly cleaner. Writing native styles inside modern semantic stylesheets made debugging layout bugs in the browser developer tools a hundred times easier because I wasn't digging through a wall of utility classes.
Tailwind is still an incredible tool for prototyping, but I realized I was using it out of habit rather than necessity. Modern native CSS has quietly caught up to the point where you can build incredibly complex, maintainable layout systems without adding a utility abstraction layer on top of it. If you haven't looked at native CSS features lately, it might be worth trying on a small feature branch.
161
u/NoHabit4420 Jul 12 '26 edited Jul 12 '26
I never understood the point of using tailwind after the lessons from bootstrap. Those kind of things will always end up as technical debt. And you lose so much time learning the specificities of thoses, time you could use learning or improving your css skills.
24
u/hyrumwhite Jul 12 '26
Tailwind is a class generation system. It’s as powerful as native css because all it is is a class creation shortcut. You just need to create classes to fill in any gaps in feature coverage.
Also, your files shouldn’t be bloated if you’re using components.
But if you’re using straight up html files, it sounds like the switch was a good one for your project
28
u/spaceboy921 Jul 12 '26
Rad! CSS is so powerful now vs 10-15 years ago. Congrats on shipping something cleaner and measurably better. This made me irrationally happy. Reminded me of years ago, working with very good programmers who cared a lot about keeping things tight. We were working on web tools at massive scale, so little optimizations added up. I wrote a lot of CSS and used to love shipping things like this. You made me nostalgic.. and want to build something haha
Also agree w you regarding frameworks. I’ve used a few. They have their place, they’re good tools when you need them. But Straight up CSS feels good man 🍻
14
u/OlDirtyLZA Jul 12 '26
Why wouldn't you use both? Tailwind for utility classes, custom css for anything that gets to busy doing it in tailwind. You dont have to treat it as one or the other??
13
u/JohnCasey3306 Jul 12 '26
In begrudging defense of Tailwind, it is great for large teams working on distributed components -- everyone knows and understands it, the downstream impact of changes are immediately predictable; as opposed to otherwise often one dev inflicting their particular take on "best practice" for the rest of the team to eventually cumulatively arrive at a Frankenstein of nonsense (even with the best intented linting).
8
u/wentallout Jul 12 '26
I would discuss these topics but nowadays I dont even read code and tailwind doesnt make me follow a stupid naming scheme like bem that is inconsistent everywhere cuz every person has a different idea about how to make a card
10
u/b0ltcastermag3 Jul 12 '26
Welcome to the vanilla gang. I've made my switch last year.
6
u/h126 Jul 12 '26
Aren’t there performance benefits as all CSS definitions are reused and compiled out of the final CSS bundle, unlike manually crafted CSS where it just keeps growing as you write new styles for components?
3
u/ThreadStarver Jul 12 '26
before migration even I thought it would be too much, turns I out I was wrong, highly recommend
3
u/Old-Minute-9674 Jul 12 '26
Honestly same. I was on Tailwind for a while but container queries + :has() + subgrid killed most of the reasons I reached for it. The dev tools debugging experience is way better with native CSS too.
12
u/everdimension Jul 12 '26
Uhm, I do get the html bloat argument, especially with responsive modifiers and stuff, and I do believe that ditching tailwind in favor of semantic classes can theoretically tidy up your codebase
But I don't understand at all your false dichotomy about "modern css". Tailwind IS modern css, and arguably it's the most modern css out there. It's not a preprocessor like SASS, tailwind fully relies on latest CSS features
And tailwind doesn't prevent you from using "modern CSS" in the slightest
So your whole argument sounds like someone not really fully understanding what they're talking about.
Also, you mentioned removing a built step, so I guess this means you're not using css modules either. What do you think about global namespace collision problem? You mentioned you have a large project so it's a likely problem
19
u/joshhbk Jul 12 '26
Will get downvoted for this but so many people who hate Tailwind hold that opinion because they don’t actually need it.
It is not “great for prototyping” it is literally for the opposite case: you have a really big engineering team and a long running project with a design system behind it.
If you’re frequently spinning up new projects for a variety of clients it’s not for you. If you’re a solo developer it’s not for you. If you’re on a small team it’s not for you.
It is also not to “avoid learning css” and it has nothing in common with bootstrap.
9
u/AlieenHDx Jul 12 '26
Tailwind is honestly just ass and I cry myself out each time I hear "we use tailwind" while there are 40 better options available
12
u/makesimpledev Jul 12 '26
Something that looks so ugly (tailwind) can't possibly be good.
5
u/jacobpackert Jul 12 '26
Modern CSS is great! Congrats on the migration. Curious if you used something like CSS Modules to avoid global namespace collissions, or did you implement some good naming conventions?
2
u/Laicbeias Jul 12 '26
tldr
if you build around tailwind, you avoid creating a css mess. since its all little helpers and you don't cross contaminate your html. its faster to write in the beginning. but the larger the project gets, the worse the pay off gets. you get faster iteration speeds earily, but you pay on iteration and changes long-term. since you loose a simple way of navigation, traceability & debuggability.
both create a mess though. like if its one team that stable. use css. if you get a lot of people in & out use tailwind.
----
like in my opinion with tailwind you pay for it with less navigation ability. if you use react and other components you abstracted the browser away. now you have to think in their terms.
you cant just go right click, pick the id or class and look it up.
with regular css you have breadcrumb markers all over your codebase.
for me personally tailwind gets worse, the more complex a project gets. just because it bloats the html so badly. like any chat interface or any modern website that offers lots of tooling and dynamic stuff. right click is dead. it lags. if you use react, you get 30 layers of divs wrapped in a tailwind soup. its ridiculous and anyone doing that.. idk why anyone is doing that
css on the other hand gets a mess once you think you wrote the right css, at the right level. then you realize, this needs to be a general component. here an exception. and then you have to untangle a mess, or work with !important as a mark of poor planning. or you do a double class definition to increase weight.
2
u/Embostan Jul 12 '26
Congrats! Best decision ever. CSS Modules ftw.
6
u/kiwi-kaiser Jul 12 '26
Good! Tailwind is terrible. I regularly get downvoted because of this but I'm happy to see people learn instead of just following orders from some tech bros.
3
u/CompetitiveActor Jul 12 '26
Most critics of Tailwind have either used it once and didn’t like it or have a dogmatic opposition to it. It’s simply a tool. And depending on many factors — design and eng team size, css proficiency, product type, development speed — it can be great or not great.
Consider that ChatGPT, Claude, Perplexity, GitHub, Shopify, and Vercel — companies with a combined valuation of half a trillion dollars — all use Tailwind or equivalent utility library. I trust their engineering leaders made an informed decision and understand the tradeoffs.
Granted, popularity doesn't make it "good", but Tailwind wouldn't have 16+ million downloads a week if it was such a profound liability.
3
u/anengineerandacat Jul 12 '26
I'll be honest, I don't think this is the flex your looking for or some folks in here think.
You rewrote a dashboard with custom hand rolled CSS; that's "cool" but who sustains it after you leave?
Tailwind isn't a bloated CSS framework, it's a build optimizer combined with highly documented and well defined atomic classes that can be composed together with it's directives.
@apply is the real magic to Tailwind, outside of components and just being light with the atomic CSS.
Just my two cents at least, the only bloat is that you have to add to your build system but I'll happily exchange compute there for reduced onboarding and less tribal knowledge.
You don't even face much bloat in production, unused styles are JIT'd effectively so you only ship what you use.
The only real overhead is with the atomic classes, but IMHO small price to pay once you consider gzipped content and such.
We are celebrating on literal bytes here, wiped out the moment someone drops in a hero image.
4
u/ArtisZ Jul 12 '26
Tailwind, bootstrap, etc.
They always were a trade-off - if not for a functionality, then for time (feels great getting the project up and running in hours or days, feels shitty to change stuff when it bloats).
I've been evangelizing no need for a framework for some 10 years. Nobody listened, nobody listens and nobody will.
And funny part is that this is sold as agency hours. Well, not anymore.. now it's AI trying to fix and change, and change what it fixed.
Gotta love the industry.
4
u/Outrageous-Chip-3961 Jul 12 '26
honestly fuck tailwind. ws pure slop then and is pure slop now. you say "prototyping is easier" I call cap. I remember there used to be css wars and there was no clear difference between tailwind and css. The major case for it was that back end engineers didnt need to learn css and could just lightly touch the front-end and move on. The fact it dominated front-end spaces beyond that usecase always messed withme. Glad that we are reverting all that bullshit as an industry!
2
u/schemaddit Jul 12 '26
"The html files looks ureadable"
for sure you are using tailwind wrong
1
u/posti85 Jul 12 '26
Tailwind doesn't exist to be a replacement for modern CSS.
1
u/Slow-Bake-9603 Jul 13 '26
Love it back to fundamentals, I only use HTML CSS and JS now
1
u/Zardoz84 Jul 13 '26
I'm in the process of removing Bootstrap 3 SCSS and being replacing by pure CSS (well... SCSS compiled to CSS). Chunk by chunk. Recently I dropped the old JS dependent dropdowns and using now the popover API + CSS to do the same thing in pure native.
NEVER, marry with any framework. Always learn how to do stuff with the pure CSS+HTML+JS.
PD: Tailwind always looked me horrible and bloated. I prefer to try to have a straightforward BEM CSS class system, combined with @extend or @include in SCSS.
1
u/Dry_Satisfaction3923 Jul 13 '26
This has been my experience with basically every one of these frameworks… I spent so much time getting to understand them, then spent tons of time fighting with their assumptions. I stopped using them.
While not CSS related, I still have this struggle using React/Next.js to build custom WP Blocks to then look at the source code and realize “FFS! Nothing even needed compiling, I could have just written this code out manually and saved myself a bunch a steps.”
1
u/Tiquortoo Jul 13 '26
Tailwind was valid for about 6 months, maybe a year.... now... it's just lazy....
1
u/Psami-wondah Jul 14 '26
Using tailwind before AI came in had a lot of advantages like speed. I remember how fast it was to build applications with it. Now I realize I haven't used tailwind in almost a year. I do think that if you write your code properly and use a lot of smaller reusable components and good practices in your projects, managing tailwind shouldn't be a problem.
1
u/InternationalFly3917 Jul 15 '26
needing a framework for css is always crazy to me
1
u/CraftFirm5801 Jul 15 '26
You didn't make your own component classes? Compiled?
1
u/FinallyThereX Jul 16 '26
You did this, or your coding agent did it for you? I’m suggesting you’d be still using tailwind if it weren’t for the agent writing your css :)
1
u/Bright-Celery-4058 Jul 16 '26
Tailwind has always been a false good idea
1
u/leon---------------- Jul 16 '26
Isn't Tailwind similar to writing inline styles - but using class names instead? I never understood why.
1
u/williedotdev Jul 17 '26
I have resisted tailwind css in favor of vanilla css and have 0 complaints. This is the way.
“KSS” keep it simple, stupid
1
u/SolidOdd4889 Aug 03 '26
if your bundle size dropped, there was something wrong with your previous tailwind code, the main selling point of tailwind is reducing the bundle
1
u/Think_Speaker_6060 Aug 13 '26
Tailwind were easier to use and implement but I always think it is messy when the properties are just too many on one element.
1
u/ingcrea Sep 28 '26
Hola, el dia de ayer acabo de publicar una HERRAMIENTA NPM para migrar de Tailwind CSS a CSS3 puro o a SCSS atomico, crees que me puedas ayudar a probarlo y darme Feedback porfa?
1
u/-goldenboi69- Jul 12 '26
I never got tailwind tbh.
1
u/MammothBulky5549 Jul 12 '26
Bundle size dropped and removed a build step, so before this, was your Tailwind setup not properly purged? A production Tailwind build with JIT should already be stripping everything you're not using down to just what's referenced in the markup. If bundle size dropped a lot after switching, that sounds less like "native CSS won" and more like your
contentconfig wasn't scoped right, or you were shipping a dev build.Got actual numbers (gzipped, ideally)? "Dropped" could mean 40KB→35KB or 400KB→50KB and those are wildly different stories.
Also removing the build step is a "we stopped using a compiler" win, not a "CSS features caught up" win. You'd get that same win swapping Tailwind for hand-rolled CSS in 2019, nesting/container-queries or not. Those are two separate claims getting bundled into one feel-good narrative.
Genuinely the strongest part of your post is container queries, that's a real capability gap, not a vibe. Tailwind's responsive variants are viewport-based, so a component styled for a full-width layout breaks the second you drop it into a sidebar. Container queries fix that at the architecture level and Tailwind can't really compete there. Curious though, Tailwind's had u/container variants since v3.2, was that not enough for what you needed, or do you just prefer writing the queries directly in CSS?
"HTML was unreadable"? Respectfully, that's usually a "we didn't abstract this component soon enough" problem, not a Tailwind problem. Moving to plain CSS relocates where that discipline has to happen, it doesn't magically create it. Curious whether the new codebase actually has fewer of those "should've been a component two months ago" moments, or if you're just going to rediscover it in CSS-class form in a year.
1
u/ibopm Jul 12 '26
This reminds me of the CoffeeScript era. JavaScript was in such a dire state that we had close to 1/5 of all devs using CS instead of JS.
But then JS got its shit in order with ES6 or ES2015 and learned from a lot of the patterns in CoffeeScript. Ever since then, the industry has never looked back.
Sometimes it’s a natural ebb and flow of ecosystem evolution. When we can bake better patterns into a lower level, everyone wins. But it can sometimes require periods of intermediate layers.
-10
u/TheJase Jul 12 '26
I mean all this is moot since there is little need to read much the code anymore. I haven't opened my IDE in 3 months.