4 ms·
> If suddenly CSS became pleasant to use, Tailwind would be in a rough spot. CSS is pleasant to use. I know I find it pleasant to use; and I know there are qui
by azangru 9mo ago
> If suddenly CSS became pleasant to use, Tailwind would be in a rough spot.
CSS is pleasant to use. I know I find it pleasant to use; and I know there are quite a few frontend developers who do too. I didn't pay much attention to tailwind, until suddenly I realized that it has spread like wildfire and now is everywhere. What drove that growth? Which groups were the first adopters of tailwind; how did they grow; when did the growth skyrocket? Why did it not stay as niche as, say, htmx?
- znnajdla 9mo agoI used plain CSS for more than a decade and felt the benefits of Tailwind within 10 minutes of getting started. What fueled the growth of Tailwind is that it makes web development palpably easier.
- azangru 9mo agoDo you remember what made it click for you? What was the hard part of writing plain CSS that tailwind made significantly easier?
- christophilus 9mo agoCSS requires discipline, or you end up accidentally styling something completely unrelated because you were overly general, or overly specific, or accidentally reused a class name. CSS disallows local reasoning. If you’re writing markup for a component, you have to jump between two files. There are plenty of other problems Tailwind solves, but these two alone make me never want to go back.
- tisdadd 9mo agoThis is why I loved polymer 1 and it's adoption of the shadow dom.
- azangru 9mo agoI agree with you about discipline; but... was it not interesting to discover how to build such a discipline? Was it not intriguing to learn how people who had been writing CSS for years had made it tolerable? Besides, there recently have been several crucial improvements to CSS to address these pain points. One is CSS layers, which lets define custom layers of specificity that help with the discipline (e.g. resets or some baseline styles go in a low layer, component styles go in a higher layer, and finally overrides end up in the highest layer). The other is CSS scope, which prevents the leakage of the styles. These should greatly help with the specificity issues; and @layer is now sufficiently broadly supported that it is safe to use. > If you’re writing markup for a component, you have to jump between two files. Yeah; one of the reasons for my question about the groups in which tailwind saw the biggest growth was that in some ecosystems jumping between files was not a problem to begin with. Vue, for instance, had single-file components, where css could be written in the same file as javascript. So did svelte. So does astro.
- jen20 9mo ago> was it not interesting to discover how to build such a discipline? Was it not intriguing to learn how people who had been writing CSS for years had made it tolerable? As someone who writes tiny amounts of CSS these days (having known it reasonably in the late 90s and early 2000s with all the hacks and IE related bullshit), I have _zero_ interest in it. If I'm doing it, it's only because there's no serious cross-platform equivalent to Windows Forms to power small experiments, and curiosity is certainly not there to improve the experience.
- christophilus 9mo agoI’ve been building web sites and applications since 2000. I’ve done just about everything you can imagine SCSS, BEM, whatever. Tailwind is the best thing I’ve seen in that time. We can agree to disagree about that, and that’s OK. I should note that other than Clojure, I absolutely hate dynamically typed languages. I suspect (though dunno how to prove it) that folks who like Tailwind probably like statically typed systems and maybe functional programming- it seems to fit into that philosophical niche. And probably people who like vanilla CSS are in a different category. I’d love to hear from both camps to find out whether or not that tracks.
- benjiro 9mo agoIgnoring that Tailwind requires that same discipline... Pay close attention how often you end up in a situation where a different color was used, or how dark theme tags have been missing, and so much more. What if you need to copy a element with tailwind, this later gets altered to include a slightly different style, but wait, now you have a original somewhere else in your code base, that is missing those updates. So you require the discipline just like CSS to keep things up to date. Tailwind is great if you use it sporadically ... but have you looked at the source code of so many websites that use tailwind? Often their entire html file is a horrible mess million miles long tags. I am amazed how often people do not even realizes that CSS supports nested Selectors? With nested Selectors, you get the benefit of creating actual component level structures, that can be isolated and shareable. Yet almost nobody uses them. I noticed that most people lack a lot of CSS knowledge, and they find it hard because they never stepped beyond the basics. Nor do they keep up to date.
- hamandcheese 9mo ago> What if you need to copy a element with tailwind, this later gets altered to include a slightly different style, but wait, now you have a original somewhere else in your code base, that is missing those updates. So you require the discipline just like CSS to keep things up to date. You solve these problems by creating abstractions in JavaScript (most likely react components), exactly the same way you'd solve any other sort of code duplication. By using tailwind (or inline styles), you go from two system of abstraction (CSS, JavaScript) to one (just JavaScript).
- yencabulator 9mo agoIf you're using JS for any kind of "components", you can use JS for scoped CSS too.
- paradox460 9mo agoThe situation you describe is one of the most maddening things about tailwind, and what leads to most of it being write only code, in my opinion
- aleksandrm 9mo agoWhat were the benefits that you felt instantly? I still don't feel anything and would prefer plain CSS over Tailwind any day.
- ForHackernews 9mo agoIt lets you apply styles to a single element without it messing up the whole rest of the page/site/app. i.e. it disabled the primary feature of CSS, the thing most people don't want from it.
- Tade0 9mo agoHow is that different than inline styles?
- azangru 9mo agoVery different :-) Inline styles do not have access to @-rules.
- matt_kantor 9mo ago@scope[0] is perhaps a better comparison. [0]: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@scope https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/A...
- peacebeard 9mo agoI agree that the primary feature of CSS is what people don't want from it anymore. If you're building your app with components (web components, react, etc), those become the unit of reuse. You don't need CSS to offer an additional unit of reuse, it only complicates things at that point.
- azangru 9mo ago> You don't need CSS to offer an additional unit of reuse Erm. Isn't this one of tailwind's selling points? That you have a set of classes that you keep reusing?
- hahahahhaah 9mo agoIs CSS pleasant in teams of fullstack (not CSS specialists)? Not in my experience. It becomes a maze of Chesterton's fences.
- azangru 9mo agoI would have understood if tailwind got popular primarily among full-stack or backend developers: people who have neither time nor interest to learn CSS deeply. But, what contradicts this expectation is that one still needs to acquire CSS knowledge to use tailwind, and that some front-end developers seem to prefer it as well. Although I still cannot tell whether there are more front-end developers who prefer tailwind over plain CSS than the other way around.
- hahahahhaah 9mo agoI was too subtle but the issue is less understanding CSS and more collaborating in a team where someone decides to add a specific rule that fixes something applies on every page but makes no sense semantically. Then do that 100 times to create spaghetti. CSS rule anywhere can affect anything whereas tailwind is more local. You can also bricklay it along lines of components in React, so you know how X component renders always and it wont look like a pig when tranplanted to the legacy billing screen. I now recall why I like tailwind! Been backending for a while now (zero regrets lol)
- cluckindan 9mo agoThe irony is that Tailwind is not semantic at all.
- hahahahhaah 9mo agoThats not irony so much as the reason. BYO semantics (using React most likely) It is style assembler.
- cluckindan 9mo ago
- nojs 9mo ago> What drove that growth? It is a natural fit with component-based frontend frameworks like React. You keep the styles with the component instead of having to work in two places. And it’s slightly nicer than writing inline styles. The core CSS abstraction (separating “content” from “presentation”) was always flimsy but tailwind was the final nail in that coffin. Then of course LLMs all started using it by default.
- paradox460 9mo agoYou've been able to keep the styles in the component well before tailwind turned the class attribute into ersatz inline styling. CSS-in-JS has been around for a decade, and there are myriad options for react. Vue and Svelte have them built in.
- skybrian 9mo agoWriting CSS manually was never all that pleasant for me, mostly the part about debugging it when it doesn't do what I want. So I tried Tailwind and it seemed to help. But now that Claude Opus 4.5 is writing all my code, it can write and debug CSS better than I can use Tailwind. So, CSS it is.
- ahussain 9mo agoClaude can also write and debug tailwind for you! :)
- shimman 9mo agoDebugging CSS nowadays is way easier than even 5 years ago. There are a lot of cool browser debugging tools for animations, z-indexes. The browsers have come a long way since firebug. Definitely look into both chrome or firefox, their tooling is great. Especially firefox, they have debugging tools where you can create css shapes in the browser and save them. Very handy for those artsy fartsy sites.
- daemonologist 9mo agoImo CSS is not pleasant to use, but Tailwind is at least as bad and furthermore is bad in addition to the CSS badness which it does not fully replace. It is a mystery to me as well how it got so popular. (I know many people disagree, which is fair enough.)
- paradox460 9mo agoFe devs who refuse to learn css and instead use tailwind have always struck me as incredibly odd. It's like a carpenter who refuses to use a hammer because they hit their thumb once as an apprentice I wrote this piece on tailwind a few years back, and little seems to have changed https://pdx.su/blog/2023-07-26-tailwind-and-the-death-of-craftsmanship/ https://pdx.su/blog/2023-07-26-tailwind-and-the-death-of-cra...
- sefrost 9mo agoIt’s interesting to me because CSS is very stable. It doesn’t really change that often. It’s great foundational knowledge to have for people who build for the web.
- paradox460 9mo agoAnd nearly every step it's made has been for the better. I used sass on that blog, because a few corner case features weren't widely available when I last did work on the style, but for the last 3 projects I've worked on, I don't use it anymore. Pure css can do basically everything I needed before. Sure, I bundle using bun's bundler, but that's for performance optimization, nothing more
- 4nonverbal-alit 9mo agoTailwind is just bootstrap with marketing budget
- fpauser 9mo agonah
- dustingetz 9mo agobackend devs needing to be fullstack but consider frontend to be beneath them
- poor_frog 9mo agoI'll give my guess - it's because of rhe "fullstack" bullshit. I am a backend developer. I like being a backend developer. I can of course do more than that, and I do. Monitoring, testing, analysis, metrics, etc. I can do frontend development, of course I can. But I don't like it, I don't approach it with any measure of care. It's something I "unfortunately have to do because someone who is not a developer thought that declaring everyone should be doing everything was a good idea". I don't know how to do things properly on the front end, but I definitely can hammer them down to a shape that more or less looks like it should. For me, shit like Bootstrap or Tailwind or whatever is nice. I have to spend less time fiddling with something I think is a waste of my time. I love working with people that are proper front end developers for that reason, and I always imagined they would prefer things more native such as plain CSS.
- ahussain 9mo agoPeople like tailwind because it feels like the correct abstraction. It helps you colocate layout and styling, thereby reducing cognitive load. With CSS you have to add meaningless class names to your html (+remember them), learn complicated (+fragile) selectors, and memorise low level CSS styles. With tailwind you just specify the styling you want. And if using React, the “cascading” piece is already taken care of.
- zarzavat 9mo agoThe point of CSS is specifically to separate styling and semantics, so that they are not tightly coupled. If you were writing a blog post you would want to be able to change the theme without going through every blog post you ever wrote, no? If I'm writing a React component I don't want it tightly coupled to its cosmetic appearance for the same reason. Styling is imposed on elements, intrinsic styles are bad and work against reusability, that's why we all use resets is it not? I do agree that the class name system doesn't scale but the solution is not to double down on coupling, but rather to double down on abstraction and find better ways to identify and select elements.
- amrocha 9mo agoYou’re kinda late to the party. 15 years ago that was the way to build UIs, but componentization changed that. Now we reason about UIs as blocks, not as pages, so collocation of logic, markup, and style makes the most sense. Not to say that every component should be unique, generic components can be built in an extensible way, and users can extend those components while applying unique styling. Theming is also a solved issue through contexts. Reducing coupling was never a good idea. Markup and styling are intrinsically linked, making any change to the markup most likely will require changes to the styling, and vice versa. Instead of pretending we can separate the two, modern UI tools embrace the coupling and make building as efficient as possible.
- zarzavat 9mo agoIn the webdev world being late is the same as being early. Just wait for the pendulum to swing back. Tailwind is like GenZ has discovered the bgcolor="" attribute. > Markup and styling are intrinsically linked, making any change to the markup most likely will require changes to the styling, and vice versa. No, not vice versa. It's only in one direction. Changing the component requires changing styles, but changing styles doesn't require changing the component if it's merely cosmetic. If I have a button and I want to make it red the button doesn't have to know what color it is.
- kaicianflone 9mo agoI haven’t seen this mentioned much, but Tailwind’s rise closely followed a shift away from runtime CSS-in-JS toward build-time, deterministic styling. Many JSX-era libraries (MUI, styled-components, Emotion) generate styles at runtime, which works fine for SPAs but creates real friction for SSR, streaming, and time-to-first-paint (especially for content-heavy or SEO-sensitive domains). As frameworks like Next.js, Vue, Svelte, Angular, and now RSC all moved server-first, teams realized they couldn’t scale entire domains as client-only SPAs without performance and crawler issues. Tailwind aligned perfectly with that shift: static CSS, smaller runtime bundles, predictable output, and zero hydration coupling. It wasn’t about utility classes. It was about build-time certainty in a server-rendered world :)
- yencabulator 9mo agoYour examples, Vue and Svelte, give you build-time predictable output with scoped CSS without Tailwind. All the benefits and none of the downsides!
- gofreddygo 9mo ago> CSS is pleasant So is SQL. To me. But some otherwise rational people have an irrational dislike of sql. Almost like someone seeking to seal a small bruise with wire mesh because bandaids are hard to rip off. The consequence shows with poorly implemented schema-free nosql and bloated orm tools mixed in with sql. But some folks just like it that way. And most reasons boil down to a combination of (1) a myopic solution to a hyper specific usecase or (2) an enterprise situation where you have a codebase written by monkeys with keyboards and you want to limit their powers for good or (3) koolaid infused resume driven development.
- DangitBobby 9mo agoDecades of SQL hate eviscerated in one comment! /s