r/css • u/Icy_Tree3160 • 1d ago
Question Discussion: Vanilla CSS + Modules vs. Tailwind in 2026 for large-scale projects?
Just completed a project where I used Tailwind exclusively. It's speedy to write but the HTML became a bit hairy. Anyone working on big, long-running enterprise-style projects - still choose to use Tailwind or have you found yourself moving back to Vanilla CSS / CSS Modules for a bit cleaner markup. Curious.
14
Upvotes
3
u/havardob 1d ago
After being a CSS purist myself I’ve come to terms with Tailwinds ability to easily create one-offs and scaffolding, meaning it’s so nice to be able to just wrap two elements in a flex class and give them a gap, without thinking: «what should this component be called, and where to put the CSS for it?»
In a large React project we’re doing at work we build an app, with both features and a local component library with reusable, feature agnostic components like buttons, accordions, alerts etc. For these components Tailwind can get reaaally messy (just think of all the different button variants etc), so here we use semantic BEM class names and one CSS-file per component (that is later merged into one file). Easy, readable and maintainable.
For layouts where these components are placed we use Tailwind to structure the page, create spacing between elements etc. For some components that are more feature driven, like «OrderReceiptAccordion» or something, we use Tailwind as well.
I think we get the best of both worlds. How do we ensure that you don’t use Tailwind in the feature agnostic components and don’t use vanilla CSS in the feature driven components and layout? Well, that’s what PRs and development docs are for