7 ms·
I don't recommend Tailwind CSS
- oldmoozy 2mo agoNobody does. Yet it is everywhere, like AI slop.
- Induane 2mo agoI recommend it for certain situations. I think this is one of those cases where there is no objectively "right" opinion. Tailwind exists for a reason and got a market for a reason. That doesn't mean it is always used in the places it's most helpful or that people don't misuse it (or simply not understand the complexity beast that is CSS). That's just the nature of any popular tool I have my own opinions about where it's useful and why, but they're just that; opinions. It's okay for folk to think differently, that is pretty helpful.
- smalljelly2018 2mo ago[flagged]
- noduerme 2mo agoGod help me, somewhere around 2016 I started using some alpha version of Bootstrap 4, and I just keep using that same version for all the basic stuff underneath my own SCSS for whatever I'm building. It's absolutely fine. A lot of it is displaced now by grids, but for flexbox stuff and modals and pushing rows and columns it just works. Very easy to remember class names and extend it. Thankfully I don't work for a company that cares about using the latest thing. The only really critical things I need in scss are scaling typography and variables representing colors for iteratively generating class names and gradients and transparencies and stuff like that. By "scaling typography" I mean, I just have a loop that writes .scaling-typography-[a]-[b] where a and b range from 1 to 16, and the class that's generated scales from [a]em to [b]em between a phone size and a desktop size. In a rare case where that doesn't just work or it doesn't look good on a tablet or something, a couple specific rules extending xs- or sm- or whatever will cover it.
- monkeyisland 2mo agoI've used a lot of tailwind professionally over the last few years and I agree with this article - it is spot on. I never even use tailwind in my own stuff, even though I think that small devoper-led side-projects are where it is a good fit (and the reason for it's popularity).
- yurishimo 2mo agoI have the opposite experience regarding where it’s useful. In large teams , using an atomic css framework provides good guard rails and predictable behavior. I can confidently copy a marketing page or some random thing on the other side of the company and with very minimal tweaking, it will probably work. With normal CSS, the cascade is much more likely to cause subtle shifts in behavior over time as the main stylesheet is extended and modified. To be clear, I like css and I find the cascade a great tool, but I also have first hand experienced the pain of too many chefs in the frontend styling kitchen and the havoc that seemingly innocent tweaks here or there can wreak on a site and I prefer tailwind for that reason.
- nehalem 2mo agoI wish it would at least be kept out of UI frameworks.
- cpursley 2mo agoMy sass customers don't even know what css means, it's fine. Nobody cares as long as the things they expect are on the page in the right position and font is readable.
- azangru 2mo agoDo your sass customers know what javascript is or how it's different from java? Does this mean developers shouldn't care either?
- cpursley 2mo agoThey don’t, unfortunately. Any time I bring up the wonders of Elixir/Erlang or how great Postgres is, their eyes glaze over unless they have some kind of technical background. I’ve had many conversations where people were surprised there’s more than one programming language, they assume it’s some sort of 1s and 0s that flash past the screen Hollywood style.
- Induane 2mo agoI sometimes use edexui + btop to mess with business types.
- grsmvg 2mo agoAs a 26+ year frontender, years ago I was against it on so many levels. Until I tried it. Never looked back. Also, inheriting projects with someone else’s code is fine. Just a quick look at the central config and you’re good to go.
- ejoebstl 2mo ago100% this. It looks terrible until you try it and it starts making so much sense. Also works great with agent assisted development.
- arnejenssen 2mo agoTailwind looks bad on "paper". It violates a lot of "best practices". It is ugly. Yet in reality it works. It gets the job done. It is fast to work with. Constraints are known to enhance creativity.
- Maxion 2mo agoIMO this is one of those things where theory meets practice. Theoretical coders (i.e. those who love the code itself, rather than how well it works for the end user) tend to hate on Tailwind, while those who prioritize end user value over code perfection tend to like Tailwind.
- dist-epoch 2mo agoSemantic CSS is Java AbstractBeanFactoryBuilder. Or as Steve Yegge put it, Kingdom of Nouns. Tailwind CSS is Python dictionaries where you don't create one user-order-deliver-date CSS class for every Noun you have.
- seanclayton 2mo agoMy constraint is "use vanilla CSS" ;) I made a huge solo project in tailwind. Never again. Vanilla CSS is perfectly fine for my own uses. In fact, I've gone a whole 'no classes' style and used as much semantic HTML and modern CSS and can get extremely far. No more looking into the tailwind docs to learn its syntax on a modern vanilla CSS feature that I've been waiting for.
- LunicLynx 2mo agoThe problem isn’t tailwind, it’s css. It always has been css. That being said, it’s a hard problem and I don’t have a better idea. Tailwind seems to at least fix or move the problem in the right direction.
- qsort 2mo agoCounterpoint: the problem is actually HTML and most of webtech is increasingly elaborate cope mechanisms to deal with the original sin.
- TZubiri 2mo agoEvery technology is going to have a problem, if you install something new, you'll have to discover the problems, if you use the standard tech stack, you will know exactly what the problems are.
- 9dev 2mo agoThis is such a bikeshedding debate. While you don't recommend it, projects with Tailwind work. Over years. You can onboard new developers to it, able to contribute productively immediately. Likewise, you can pick up work after months or years and don't have to remember or rediscover how your styling layer works. The conventions and class names come really naturally fast, and you can always look it up. It's just not as a big of a problem people make it. But the most ridiculous part of the article I found the cascade complaint: <p class="text-red-500 text-green-500">I am some text</p> Yes, this does not work. Why should it?! There is not a single use case where this is a good idea! In classic CSS, you might want to override something based on modifier classes, but that is just not a thing with Tailwind! If you end up programmatically layering class names, you're looking at a code smell. Instead, you want to use attribute or state modifiers, like `aria-hidden:opacity-0`.
- guessmyname 2mo agoThe fact that “text-red-500 text-green-500” resolves by stylesheet source order rather than anything visible in the markup means the “locality of behavior” promise quietly breaks exactly when you compose components dynamically, which is why tailwind-merge exists at all, and needing a runtime dependency to answer “which of my two classes wins?” is a real design smell, not a bikeshed.
- gf000 2mo agoIt's not true - agents will visibly struggle more with worse code bases. If anything, certain kind of maintainability matters more in this era, than before, because it is so much cheaper to just generate a huge amount of low quality code.
- deleted 2mo ago[deleted]
- 9dev 2mo agoThat is kind of my point, though—you don't need tailwind-merge, really. There are two cases it solves: One, adding classes from the outside to an encapsulated component with its own, internal classes, to make sure the outside-applied classes take priority. Either use the !important modifier on them (`ms-auto!`), put the components into a container div with the classes for layout concerns, or even better: Figure out why you need to make styling changes to a component that cannot be expressed via props. I would generally recommend components to not have outside-element styling like margins in them anyway, which most often fights with positioning later. Two, merging prop-derived styling with base styles - for example for a `size: 'sm'|'lg'` prop. It's tempting to just use tailwind-merge here: const classList = tailwindMerge( 'p-4', size == 'sm' && 'p-2', size == 'lg' && 'p-6', ); But that isn't necessary at all: The better alternative would be to use data attributes for visual concerns and built-in or aria attributes for interaction states. There are almost always element attributes that can represent what you want to have correctly, and data- where there are not. Then, you can just add a class accordingly: <span class="p-4 data-[size=sm]:p-2 data-[size=lg]:p-6 data-active:font-bold" data-size={size} data-active={active} /> And you'll end up with easier to maintain components that derive their styles from the CSS cascade alone.
- tuyiown 2mo agoI’d be rather interested in a recommandation that don’t comes with de usuals pits of others solutions and comes with a the actual css code that will apply to the element displayed in autocomplete while editing the html / jsx.
- EugeneOZ 2mo ago[flagged]
- qsort 2mo agoI'm not a frontend guy so take this with a pinch of salt, but for a few personal projects I've done my approach is now "ai pls generate css". I thought it would be inconsistent and broken, but if you tell it to care about accessibility and you're willing to clean up a bit it's not that bad and you end up with very compact transfers after minification. I tend to like simpler/textual interfaces though, admittedly this won't be everyone's cup of tea.
- croemer 2mo ago> there is a ceiling of basic classes you have to internalize I think you mean floor. Floor is a minimum you need. Ceiling would be the maximum you can achieve. Below this floor you're not useful. There's a ceiling to how much you can do with no code tools.
- LauraMedia 2mo agoI agree with all points and they are the reason I'm very selective which project uses it and which doesn't. It did give me some ideas for my own stylesheet writing though. The colorsystem is something even non-tailwind projects will have now.
- zkmon 2mo agoI think tailwind helps. It is same as AI prompting, but in a deterministic and fine-grained way. Bottom line - it reduces the time to build.
- francislavoie 2mo agoSaying "unless you use @apply" invalidates this article for me. Everyone knows that @apply only exists as an escape hatch, it is not supposed to be used, except for when it's necessary like for compatibility with libraries that declare their own classes that you need to override. The most commonly repeated point in the article is "escape hatches bad" and I think that's completely absurd. Of course you want escape hatches, otherwise when you do hit an edgecase you get stuck with no solution. That's exactly what would force you to throw away that approach and pivot. Tailwind doesn't have that problem because it was designed to include escape hatches. Users deciding to use those escape hatches instead of sticking to a design, isn't Tailwind's fault.
- nextaccountic 2mo agoIt makes no sense for me that @apply is frowned upon. It's what makes Tailwind actually kinda usable for me. Without it, markup looks like line noise full of boilerplate that's hard to modify in a systematic way. I think what Tailwind actually needs is more abstractions, not to discourage the use of the sole abstraction @apply
- francislavoie 2mo agoUsing @apply defeats the entire purpose of Tailwind. The point of it is to localize styling alongside the markup. If you're using @apply then you're constantly context switching from your markup to your CSS files while working. There's plenty of ways to manage the bevy of classes you need. First step is making use of components to deduplicate stuff. Then in those components, use a library like class-variance-authority aka "cva()" which allows you to set up complex named presets for your components (like size="small" or color="primary" and things like that).
- woutr_be 2mo agoI use @apply in quite a few projects, mainly because I like the defaults in tailwindcss. I know it defeats the point of tailwind, but I find that it works nicely when using BEM.
- 2mo ago
- davidd_1004 2mo agoI've seen one of these posts every 6 months for the last 5 years and not a single one has figured out components yet.
- zelphirkalt 2mo agoWhat exactly is there to figure out or what would you like them to figure out?
- davidd_1004 2mo agoUsing them perhaps? Complaining about separation of concerns never makes any sense when you use components because the components are the structure and the styles are tightly coupled. You could separate the styles, almost all of them are going to be specific to the component so there's not much of a point unless you really like writing one-off class names.
- tibastral2 2mo agoWhat is funny with your article is that you talk about tradition, when actually these traditions are based on assumptions which are themselves based on beliefs like : "separation of structure and style are a good thing". But this belief is only true if the language to describe the structure is html or js which creates not reusable pieces of style/structure. But when you go for a different approach where everything is functions and strong types (ADT), like when you use haskell for exemple, this debate is over, because you handle EVERYTHING in your code, and stop fragmenting the truth into opaque and dissociated worlds (html, js, css, database, glue, docker, ...).
- tibastral2 2mo agoI don't recommend css. Css is BLOATED. And tailwind makes it a little less bloated, but it's still not strongly typed, and not very re-usable, especially in code. But your approach is from the past man, really... .btn is not reusable among pages / projects / etc. => it's always different, and when you understand that specificity wars is the main problem of css, you will not want to use your idea again. It LOOKS cool to have a <button class="btn"> inside your html. because it's more readable. But it's NOT explicit. You fragment truth into different pieces. and it makes it IMPOSSIBLE to test things in isolation. One last thing. Using all the "last features" of css is just putting you in a place where you depend on the browser carriers to handle things for you when I prefer personnaly to rely on myself and my craft. But that's a personal one ;)
- baxtr 2mo agoI think this is a protypical discussion in tech. I have seen it soo many times in different areas. The purists ("that’s how things ought to be!") and the pragmatists ("well but it works well and people understand it seemingly").
- epolanski 2mo agoI can immediately spot organizations void of any skilled frontend engineering leadership by their use of Tailwind. Generally coupled by some memory leaking React soup, solving 2016 SPA problems in 2026. Likely 30-something years old MIT-bred leetcode ninjas that know little to nothing about front end technologies in the first place. They don't even remember _why_ the industry reached for client-side rendering library at some point. They think it's for interactivity. HN comments are quite telling about it. Bloated slop is bloated slop, I still have to find a single example proving me wrong, and what's produced on top of react-tailwind by billion dollar companies just confirms my negative bias around the people using it, the results speak for themselves.
- reneberlin 2mo agoStraight from my heart - i couldn't have said it better. I always had this answer in my head, but nobody asked and it felt senseless to talk about unpopular opinions. Now you have been faster than me, here under the umbrella of the tailwind-topic - but you should know, you are not alone with exactly that attitude.
- evcaldera 2mo agoTailwind is great. Not sure why you'd use anything else at this point.
- pixard 2mo agoI see you have a .button, cool! So did you load the entire context of your project into your mind, and calculate every possible iteration of kind, size, color etc this button may have? And once you did that, did you come up with a semantically correct naming scheme that is clear and will not succumb to the inevitable .button_checkout_special_page_cta_widget a particular page will end up requiring? No? Neither did I. I stopped thinking about CSS entirely almost a decade ago. Thanks Tailwind.
- altern8 2mo agoYes. Bootstrap and all other CSS frameworks before Tailwind did it, too. It's a matter of preference, but many times it's easier to have single classes so that all your buttons are consistent. People should just use the tool they're more productive with.
- Gigachad 2mo agoI feel like scoped css and component libraries fixed this issue. I don’t have a .button, I just have a <Button> that has all its css self contained. And just a shared color definition file.
- KolmogorovComp 2mo agoSame, my need for tailwind got completely ridden when I started using Svelte, thanks to the CSS-scoping it entailed.
- michaelchisari 2mo agoAnd @scope does this for all of css.
- satvikpendem 2mo agoThat's funny, Vue had this like a decade ago. It was nice but I switched to React instead due to library support.
- dkersten 2mo ago
- vb-8448 2mo agoNot a big fan of vanilla tailwindcss too, but (from the perspective of someone that needs the job done) "just use modern CSS" as the author suggest is even worse.
- efortis 2mo agoCSS Modules are a better solution. They compile classnames into unique identifiers, so there's no need for BEM or SMACSS conventions: https://x.com/efortis/status/1888304658080256099 https://x.com/efortis/status/1888304658080256099
- francislavoie 2mo agoI disagree. I don't want to jump between two files constantly. With Tailwind I can stick to one file and never need to think about naming things.
- nevertoolate 2mo agoRight so it is easier to write code quickly, but not to maintain a system. Tailwind is the right tool if you want to generate a prototype with LLM agents. It can be quickly deleted or can be used as visual prototype to create reusable components. And once the component is built for long term maintenance as priority, the collective knowledge has been built up so naming becomes simpler, important and elucidating.
- francislavoie 2mo agoThe component itself is the semantics, adding naming over CSS classes adds no value whatsoever, only adds cognitive load and requirement of context switching to understand "what does this named class actually do?"
- nevertoolate 2mo agoCss classes are not big issue with css nesting and if component boundaries are settled and the design is well defined before implementation. Tailwind is a shorthand notation which is harder to parse than a structured css file (at least I strongly believe this we can agree on) and thus has only editing speed gains which is largely not an issue if prior work is done on exploration. Another way to frame it: tailwind is a good prototype syntax but is not the best syntax to for production code (human parsability). I’d skip it altogether to simplify the flow.
- emsimot 2mo agoI'd appreciate a way to disable the real-time chat on this website, I don't see a way on mobile. It's currently full of racial slurs.
- parasti 2mo agoThis is written from a point of view of somebody who never went through the progression of CSS to CSS preprocessors to component-based frontend libraries. Tailwind is an answer to all the problems that become apparent in CSS in that progression.
- elendilm 2mo agoComing from Qml, reading css/html is mind numbingly hard.. Haven't seen any other come even remotely close to the readability of Qml. I am talking generic UI development, not just for browsers. 15 years and I thought someone would have by now the neat syntax that Qml has. If anyone knows an alternative, do tell. Very much looking forward to it.
- ckdot 2mo agoShow me one non-trivial project with classic, well-organized CSS usage and clean semantic HTML. It just never works out. There were attempts like BEM, which looks promising at first sight but is awkward at some points and only works if all devs strictly follow the convention. We all know how this usually works out. I once was that semantic HTML and css classes guy too, I completely changed my mind. In the end, we want to efficiently build a clean and shiny website. No real user looks into the (unminified) HTML source code to appreciate those awesome, sophisticated semantic CSS classes.
- input_sh 2mo agoMy counter-argument: I can copy any cool-looking Tailwind element I find on the Internet into my own project and it'll look exactly the same.
- zandert 2mo agoStrongly disagree with the point of not learning CSS. Bootstrap and the sorts that were en vogue before were terrible abstractions. All the mental models required to be good at writing proper stylesheets are trained nicely with Tailwind
- wildrhythms 2mo agoYou have to know CSS to work with tailwind, it literally demands knowledge of the underlying rules.
- CerebralCoding 2mo agoI think having an unmoderated chat directly on the page certainly is a choice…
- mgaunard 2mo agoWe already tried the fully semantic web in the days of XHTML, where the document is purely semantics and CSS purely transformation. It didn't work in practice, because people want to structure their document based on how they expect it to be presented. My understanding is thay HTML5 was built on the understanding that language purity just went in the way of productive compromise.
- verve_rat 2mo agoI know complaining about the site is poor form, but it is really hard to take advice seriously for a site that lets other visitors spam... just general internet things to other visitors. Cute idea, but it is pretty clear the author doesn't consider practical consequences, so why should I trust their judgement about Tailwind?
- tmgldn 2mo agoTailwind didn't happen by chance - it was the culmination of many other failed philosophies for addressing a problem with CSS when it gets large. Centrally the problem is this: large CSS requires a lot of active effort to prevent it becoming spaghetti code. Writing your own CSS can work in solo projects or small projects but Tailwind was designed for large projects, teams and developers with an irrational fear of CSS.
- latexr 2mo agoIt’s funny how, upon opening the website, you’re immediately greeted with a “Was Top 1 on Hacker News” link leading back here, but (at time of writing) it has under 50 points and almost every comment disagrees with the post. While I don’t really have a strong opinion on Tailwind CSS, I do have a strong negative reaction to websites who advertise to everyone how many people are on the page, especially when that’s shoved in our faces and people can send malware links and spam to everyone else (as is happening in droves).
- eugene3306 2mo agoI tried to use Tailwind in a hobby project couple years ago. I havn't updated my CSS skills since 2010 or 2015 -- I certainly missed grid layout and some other new features. Quickly, I realized Tailwind is documented on top on CSS, no way around. This makes you keep in mind both. No idea why is Tailwind even a thing.
- progx 2mo agoif you don't like this. .button { @apply py-2 px-4 bg-indigo-500 text-white font-semibold rounded-lg hover:bg-indigo-700 focus:bg-indigo-700; } why not write it like this? .button { @apply py-2 px-4 bg-indigo-500 text-white font-semibold rounded-lg hover:bg-indigo-700 focus:bg-indigo-700 ; }
- progx 2mo agoOr: .button { padding: var(--gap-s) var(--gap-m); background-color: var(--color-indigo); color: var(--color-white); font-weight: 700; border-radius: var(--gap-s); &:hover, &:focus { background-color: var(--color-indigo-hover); } } Fair comparison (i really don't like this too): .button { padding: var(--gap-s) var(--gap-m); background-color: var(--color-indigo); color: var(--color-white); font-weight: 700; border-radius: var(--gap-s); &:hover, &:focus { background-color: var(--color-indigo-hover); } } ;-)
- progx 2mo ago"Nothing stops you from using sky-400 and blue-400 in the same project. Consistency still depends on your discipline, not on the framework." And how did plain css solve that? You're mixing up a few issues there.
- herrkanin 2mo agoI was very much in the Tailwind camp, and simultaneously loved it for its local reasoning and disliked it for how its long class names messed up my components. It has always felt like a bolted-on hack to me but I couldn't argue with the benefits. Turns out, CSS Modules comes with the same benefits while feeling much more like a natural extension to the web platform. The only thing I thoroughly miss is functions and directives, which hopefully will land in browsers through the mixins proposal in not too long of a time.
- xka0085 2mo ago[flagged]
- chrismorgan 2mo ago> It is hard to read The hilarious thing here is that without JavaScript, the code is white-on-white, because some of the colouring is added on pre[class*="language-"], but the language-css class is only added to the pre element by JS.
- sureglymop 2mo agoMy (certainly not unique) take is: As with almost everything, choose what you use based on context. There is a very wide range of websites and web applications you can make. For some of those tailwind is a good fit. For many it is not. For my own projects, I have been perfectly fine with just one large global CSS file, extending it just when I have to. But I could this being maybe tedious when working in a large team.
- bloomca 2mo agoThe argument basically boils down that in non-component approach (so not a modern web framework) it is harder to reason if you use tailwind classes. The rest is some serious bikeshedding, imo. I personally started with atomic CSS framework (that was before Tailwind, we had our own) and it has both ups and downs, but overall it is really nice to use once you learn it, and it is not really hard to do so. It does not do anything to enforce variables, but that's why you need to roll either your own layout primitive components or some classes.
- afavour 2mo agoHonestly I tire of this debate. Both sides have good points have both choices are valid. I don’t particularly like Tailwind because I know and like CSS. It’s powerful, Tailwild stands in the way of me doing what I want with it. But in this thread you’ll see people saying “it’s great, I haven’t had to learn any CSS in years” and that’s not an invalid viewpoint. Tailwind is to CSS what React is to the DOM, if not even more so. If you’re working on a ton of boilerplate UI it lets you get the job done without having to learn the core technology being used. For better or worse that’s where the industry is today. All I would say is that solely Tailwild folks owe it to themselves to look at modern CSS sometime. The arrival of variables in particular is a gamechanger and makes things like palettes and theming far more intuitive than it ever used to be. When I see how Tailwind handles dark mode I cringe. With raw CSS you set a color palette as variables then override them with a media query. The element itself doesn’t need to have anything added.
- Aeolos 2mo agoThat’s exactly how I’m doing this using tailwind and daisyui though, so I’m not sure what point you are trying to make? My global tailwind.css defines two sets of css vars for the light and dark theme, and it all gets applied globally with a single line in my root html template. I don’t need to touch my markup. Tailwind simply compiles this down to a single css file in the end.
- dankobgd 2mo agotailwind is the worst thing ever, i hate this so much
- dmitrijbelikov 2mo agoI'm still on bootstrap, and it still works for me.
- maelito 2mo agoWhat's so strange with Tailwind users is how insistent they are to impose it to codebases they don't know. I've never seen this even with vue vs react. People that didn't write lines of code on this project, or so. A few months later, your codebase has very long lines of HTML with classes that encode a whole programming language as strings separated by spaces, and barely no component anymore, nor semantic CSS tags.
- francislavoie 2mo agoYour complaint is about bad developers, not about Tailwind. Using Tailwind correctly means making heavy use of components to avoid duplication. Using Tailwind also removes the burden of having to do one of the hardest things in software: naming things, which is what semantic classes requires you to do.
- neuroticnews25 2mo agoThe cat shoutbox thing was fun, but it stopped working.
- de6u99er 2mo agook
- gherkinnn 2mo agoThis discussion again. We've been having it for 6 years now and Tailwind remains popular. Lindy's Law tells us it will remain popular for a while longer. Many people are productive in it, others hate it. Carry on.
- meerita 2mo agoI am building a version 2 of my FCSS framework. https://github.com/meerita/FCSS2 https://github.com/meerita/FCSS2 check it out, fork it, use it, you're welcome.
- SebastianKra 2mo agoWe need to talk about two use-cases separately: CSS for design systems is fine. You can define a .button[data-variant=”primary”]. It’s intuitive, performant, makes sense. CSS for application code is terrible — specifically layout & typography. The different kinds of flex/grid layouts are tightly coupled to the dom structure. Tailwind is a great fit here: <li class=”flex flex-col”> <div class=”font-medium”>Title</div> <div class=”text-sm”>Subtitle</div> </li> When you remove layouting concerns and maybe typography. You actually get close to the separation of concerns that CSS was initially aiming for. HTML determines arrangement and css determines the design system (colors, borders, shadows etc...). I havent seen this discussed a lot. The old Radix team had a short note: https://www.radix-ui.com/blog/themes-3#the-best-of-both-worlds https://www.radix-ui.com/blog/themes-3#the-best-of-both-worl...
- interstice 2mo agoFor a very long time now I've avoided anything other than 1 class per div with style overrides and written with modular rules and 1-2 degrees of separation between label and rules. Something like .title { @include type-heading; &.LARGE { @include font-size-large; } @include onMobile { ...something } } This has the advantage of being naturally rule based and amazingly succinct to write and understand. Needless to say I'm an odd duck, since I almost never see css written this way. (edit: I forgot how to format code on HN)
- m2026 2mo agoIn my opinion, the main problem with Tailwind is that it attempts to replace all CSS. Tailwind classes are often non-semantic and don't align well with CSS property names. Where pure CSS can be used, the code will be cleaner and more readable. It's important to remember that HTML has a "style" attribute, and it's often much easier to define a style block directly in the "style" attribute than to use a fragment and Tailwind's cumbersome CSS classes.
- dev_l1x_be 2mo agoPre-llm era Tailwind was great for the backend people who did not want to learn CSS. Nowadays agents got this. Openprops might be a good option even with agents, at least for me it works well. Not a surprise that Tailwind popularity dropped significantly. I think the another llm-victim is React. For a while it was great to have a heavy framework that somewhat standardised webdev's JS approach. Astro just become the default goto lightweight option that is great to quickly build a nice simple UI.
- HeYmaney 2mo agoMy personal experience (for what it's worth): I've used Tailwind across various project of different sizes for about one year then simply stopped using it. I just don't see any real advantage to use it over regular CSS.
- _the_inflator 2mo agoI registered my first domain 1997 and before that already coded websites: members.aol.com/…/ I saw the inception of CSS, the infamous ACID test, IE6, web standards movement - anything and everything. To this day, CSS is something that is not separating design from markup (try logic, you will get it), and as all things technology is now a mix of technical constraints, backwards compatibility, totally conflicting decisions. I am traumatized with floats and clearfix, and there was a lot of debate around CSS 3, JavaScript. Layout wise, “the web” aka web traditionalists or whatever went bezerk against any attempts to allow for what today is dominating: print layout as role model. Formerly flow was all about responsive web design, being as fluid as it gets. CanIUse had to be brought to life to solve the questions, what features needed to be done in JavaScripts, which not. Stylus, BEM, bootstrap, SCSS etc. All kind of conventions and preprocessing helpers. CSS is hard and will stay hard, in fact I am stunned by the author’s total ignorance of where CSS came from, why something is the way it is. Maybe he is just a young gun and thinks that CSS is only flow, grid and CSS3 and always waiting for cool new features which do what? What purpose do they have, which problem do they solve? Tailwind is genius. There is pro and con for everything but looking back it is just another evolutionary step on the shoulder of the mentioned giants. To this day no framework or system was more simple and elegant than Tailwind. The author’s naive conclusion is a variation of the running gag that started with https://youmightnotneedjquery.com/ https://youmightnotneedjquery.com/ Tailwind is shadowing native CSS functionality? I felt pain reading this because so what? That”s not the point. We use preprocessors, postprocessors, optimizers - what I don’t want to do is using CSS’s own bad naming nomenclature which is used because of backwards compatibility. In fact abstracting away basic functionality and simply let the compiler decide what is best given the situation is mentally helpful. Working in large teams, or many teams. Guess what will happen: we build our own CSS framework, well we build ten because everyone knows best. The author really should be thankful for the genius job Tailwind does, because he seems extremely inexperienced and never faced hard challenges. In fact if your only problem is to decide between two frameworks, you are lazy and not considering other people. Browser compatibility, breaking changes, different CSS as well as JavaScript engines - this was brutal. Today? Luxury discussions. The fact that Tailwind allowed for a gazillion of partly stunning CSS design systems and React components like ShadCN and others is proof enough that Tailwind is a platform with the best pro/con ratio so far. This has never been the case before. This is a singularity. I was founder and product lead for a huge and critical to business financial platform, seeing others easily augmenting your platform via interfaces or plugin patterns as a structured approach is genius. Extensibility is a sign of elegance and perfect abstraction. Are there downsides? Who cares with all these never seen before massive benefits? The killer against laissez fair CSS is exactly this: have you ever lead an approach to develop a framework? Why do you want to build yet another TW? Drop it. It won’t work. The question or better your solution hints at being a solo dev. This is fine but you seem so one sided in your views, I am puzzled. If I could use just native CSS boy oh boy - do you really know everything about it? Could you understand a floating layout? Could you see pro and contra for its use case or do you just not allow its usage? If yes, why if you cannot answer the question? How do you make sure, there is standardization? How do you train and coach people so that they know and can use CSS? What are your naming conventions? Why this way, no other way? How do you deal with devs leaving, new joiners? Who is overseeing the repository? Who has merge rights? Who does the code reviews? What do you do if there was an emergency and some big shot or very important order had to be accommodated and now you have garbage CSS in your platform that you must maintain and everyone can use? Boy oh boy - I love Tailwind. The versatile solution that was 30 years in the making. All you delusional freaks out there with the hubris belief: tell me how it went. I just covered a few questions. Deployment is yet to debate etc.
- deleted 2mo ago[deleted]
- shortformblog 2mo agoHonestly, I found managing a Bulma codebase significantly more of a pain in the ass than Tailwind. Tailwind offers the expressiveness of actual CSS with the ability to make quick changes on the fly. As someone who has spent a lot of time working in CSS frameworks over the years, it is one of the better abstractions of its kind. I sort of feel like this argument is trying to put a train that is already halfway across the country back in the station on the East Coast.
- xpbl 2mo agoI switched from Tailwind to plain CSS with a UI library and it honestly made my site look better. Probably because it's much harder to spam backdrop effects.
- josefrichter 2mo agoTailwind requires a certain mental shift. That typically comes on a project where you feel like "there needs to be a better way", then you read https://tailwindcss.com/docs/styling-with-utility-classes https://tailwindcss.com/docs/styling-with-utility-classes and feel like BINGO! Using @apply totally KILLS Tailwind - that's the clearest tell that the author didn't have that moment yet. Hence the other arguments in the article that feel somewhat petty.
- mexicocitinluez 2mo ago> The problem with Tailwind is that you cannot resolve this ambiguity even by reordering your classes. I guess the author has never heard of tailwind merge.
- TZubiri 2mo ago> .red-color{ > color:red > } > .big-text{ font-size:20px } My theory is that higher-level abstractions don't need to add any value to be popular, you can just create a single dependency that abstracts away one lower level dep, and people will use it only because they want to avoid learning something, in the end they will actually learn the thing with a proxy in the middle, but at least they took a shot at skipping the 'grind' of learning css.
- vcryan 2mo agoPeople tend to overlook the main benefit of Tailwind: components and pages become self-contained. As such, changing them doesn't cause unintended side-effects to other pages and all or parts of a component can be dropped into another page and it "just works." This is a huge benefit as the normative/intended behavior of CSS makes changes risky on large sites. Now, there are other ways to do this, but Tailwind is quite effective at it.
- chuckadams 2mo agoAfter trying a Tailwind-adjacent library myself (UnoCSS) I came to the conclusion that it's awful, but it's the least awful among worse alternatives. Having gone through BEM, I have no desire to go back there. Layers, modules, and scoped CSS seem like they could address a lot of the pain points in semantic CSS that TW was trying to, but I've never used any of those in anger save for Vue's emulation of scoped CSS.
- deleted 2mo ago[deleted]
- a13o 2mo agoErgonomics for hand composition are less relevant now. The most important trait is how does a long-lived project perform when written by a coding agent. I’m curious if anyone has any takes on the different approaches to agentic styling. I’ve tried Tailwind for this without further steering, and after a while the agent starts adding unnecessary utility classes everywhere. Then I taught it to micro-Ralph eval all its utility classes using screenshots and this works ok but burns a lot of tokens. Treats the symptom and not the problem IMO. Maybe with the right set of constraints there’s a subset of Tailwind that composes better? I went back to vanilla CSS for now, on the hope that it will readily port to whatever the best thing ends up being later.
- _alphageek 2mo ago[flagged]
- Kuraj 2mo ago> It breaks the separation between structure and design I have a problem with this argument because CSS _itself_ breaks that separation. `border: 1px solid red;` is design, but `display: flex;` is structure. In my opinion, it makes sense for display properties to live in the HTML because they are by their very nature very tighly coupled to the markup. Though I appreciate that making this distinction creates a separate problem of your team having to exercise good judgement (and consistency) in which CSS belongs where.
- ojr 2mo agoIDEs can autocomplete tailwind classes but eventually you just memorize them, also with AI assisted coding I don't even write the classes anymore just small adjustments like changing pt-3 to pt-4, AI implemented dark mode in a small app I am working on in one shot, I think tailwind being in the training data helped tremendously with the task.
- deleted 2mo ago[deleted]
- bryanhogan 2mo agoI also don't recommend TailwindCSS. I instead recommend using HTML + CSS in a way that scales. Plus using a framework that supports scoped components helps. I'm writing a web developer guide on using HTML + CSS and JS only when you need it: https://webdev.bryanhogan.com/ https://webdev.bryanhogan.com/ I'm also using the described approach in building a Astro starter template: https://starter.bryanhogan.com/ https://starter.bryanhogan.com/
- brachkow 2mo agoThe bane of Tailwind is that to appreciate it, you should have in-depth experience with regular CSS. Negative opinions mostly come from people who show no understanding of CSS and pre-existing methodologies of writing it at scale. This author, as all authors of similar articles, shows quite limited CSS knowledge, judging by his points. Answering every point of the author: 1. You have to learn dozens of classes – these classes are named after dozens of CSS properties. So you already know them. You also take this knowledge to other projects that are using Tailwind. 2. It breaks the separation between structure and design. Also, in HTML, you put scripts and CSS into files by design. Separation is a made-up thing. And writing Tailwind with @apply is still a valid way to write it – you lose code size benefits, but design system enforcement stays. 3. Its names are not consistent. See https://wiki.csswg.org/ideas/mistakes/ https://wiki.csswg.org/ideas/mistakes/ 4. The design system is not enforced as much as it seems – you can literally detect deviations from the design system by the [] pattern, and you can force it with linters. 5. It is not a good gateway to learning CSS – Why should it be? It's a framework, not a CSS learning resource. BTW, it is still a better way to learn CSS than with auto-scoping modules. 6. It is hard to read – The author neglects clsx that is the default/available way to write CSS in most frameworks, that allows to group classes via arrays and objects. 7. The HTML lies to you about priority – Cascade is way harder than the author thinks, and by the way, one of the selling points of Tailwind is what makes complex cascade situations completely avoidable. What if color-red and color-green are in separate unscoped modules bundled up by webpack? 8. Working with Dev Tools is not comfortable. Agree, but it's how browsers devtools work. P.S. I write CSS by hand via BEM on my own projects, and use Tailwind when I work with frontend and design teams. BEM is great, but it is much harder to onboard engineers to a BEM codebase, and no-methodology is a disastrous approach that sinks many frontend projects in bloat and cascade hell. Tailwind makes everyone familiar with code, and also Tailwind keeps our agreements with the design team in code.
- anotherevan 2mo agoMy problem is I thoroughly learned HTML and CSS twenty years ago and am only incidentally aware of how they have changed and improved since. (I'm mostly a backend programmer with some frontend skills. I work with another programmer who is the other way around. I also learnt during the time when new features to the specs moved into browsers at a glacial pace, making them hardly worth keeping up with.) For example I was spinning up a new project and added SASS so I could do nesting to make things cleaner. My frontend counterpart pointed out that CSS already has that. Anyone know of some good resources that would bring my knowledge up to date without trying to take me through first principles?
- deleted 2mo ago[deleted]
- everdimension 2mo agoYeah well I don't recommend your advice You're confusing utility CSS concepts with accidental tailwind quirks
- AnatolySkuba 2mo ago[flagged]
- EQZ 2mo ago[flagged]