A
Adam Wathan
adamwathan.me · Personal blog · on HN since 2016
Adam Wathan, the creator of Tailwind CSS, writes about CSS, Vue, Laravel and building a software business.
What HN saysHN commenters repeatedly point to his utility classes and separation of concerns post as the best argument for Tailwind's approach.
92HN people shared it
63linked it in comments
40stories submitted
695story points
6 months agolast shared
2016people per year2026
Most-shared posts
- 1CSS Utility Classes and “Separation of Concerns” (2017)61 people · 344 points · first shared 2017 · 106 comments on HN
- 2The $61,392 Book Launch That Let Me Quit My Job10 people · 24 points · first shared 2017 · 2 comments on HN
- 3Tailwind CSS: From Side-Project Byproduct to Multi-Million Dollar Business7 people · 308 points · first shared 2020 · 109 comments on HN
- 4Persistent Layout Patterns in Next.js (2019)4 people · 2 points · first shared 2019 · discussion on HN
- 5Don't Use Em for Media Queries3 people · 6 points · first shared 2017 · discussion on HN
- 6The Trick to Understanding Scoped Slots in Vue.js2 people · 5 points · first shared 2018 · discussion on HN
- 7Going Full-Time on Tailwind CSS2 people · 1 points · first shared 2018 · discussion on HN
- 8Refactoring to collections2 people · first shared 2016
- 9Methods Are Affordances, Not Abilities1 people · 2 points · first shared 2017 · discussion on HN
- 10In Search of the Perfect Tailwind Config File Structure1 people · 1 points · first shared 2019 · discussion on HN
- 11Refactoring with Collections and Null Objects1 people · 1 points · first shared 2016 · discussion on HN
- 12Adam Wathan: 2020 Year in Review1 people · 1 points · first shared 2020 · discussion on HN
- 13)1 people · first shared 2021
- 14Homepage1 people · first shared 2021
- 15Renderless components in vuejs1 people · first shared 2019
What HN people wrote when they linked it
moritzwarhier · 2025-07-22
I think the best argument for Tailwind still is the blog post that the creator wrote to promote the idea (it was before the first alpha release iirc):
https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
Everything is a tradeoff. I don't miss Tailwind in my day job, but I would certainly if I had to work on the type of project where I last successfully used it.
Yiin · 2024-03-06
A great read on the topic: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
kaba0 · 2023-10-23
I really recommend you reading the blog post by tailwind’s creator himself: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
Your “semantic” CSS depends on your HTML structure. Tailwind’s HTML depends on a fixed set of CSS styles. None is any more coupled than the other, it’s just that the direction of the dependence is different.
Depending on what is expected to change more, both can be a valid approach: e.g. for a blog post that only uses heading, emphasis, link, styling it from CSS alone is definitely the best choice (that’s what it was developed for). But I would argue, most real-world web applications see more HTML-changes, and thus the other direction may make more sense.
sbergot · 2021-12-10
In case you haven't seen it this is an explanation that is worth reading: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
mattferderer · 2021-11-17
This might be worth a read or listen to with read aloud - https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
He discusses why he changed from this thought process & mentions the old CSS Zen Garden many of us grew up with as the "ideal" way to do CSS.
Of course your mileage may vary depending on the type of work/projects you do.
hbn · 2021-11-05
I’d recommend this blogpost from the creator himself!
https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
dwmbt · 2021-11-04
i would say the tailwind docs themselves and looking at the examples were a big help. for instance, the way they visualize their flex elements was enlightening. also, learning about how atomic css is a useful paradigm was the biggest motivator for writing more meaningful and expressive css. i'll list some things i've bookmarked:
[0] https://css-tricks.com/lets-define-exactly-atomic-css/
[1] https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
[2] https://acss.io/thinking-in-atomic.html
and finally, it's always useful to read critiques. the following article is well written, in my opinion: https://www.browserlondon.com/blog/2019/06/10/functional-css-perils/. through that i learned that tailwind has a useful feature: @apply, which you can use in conjunction with a standard css class approach. i.e
container
{
@apply color-grey-100;
box-sizing: border-box;
}
adamwathan · 2021-07-29
Just speaking from my own experience, if you execute very well on audience building and marketing you can do much better than this. I have released 2 books and 2 courses for developers and together they have done close to $4m USD in revenue.
I wrote in detail about the process of writing, marketing, and releasing my first book here:
https://adamwathan.me/the-book-launch-that-let-me-quit-my-job/
And was interviewed on IndieHackers to talk about the most recent one here:
https://www.indiehackers.com/podcast/098-adam-wathan-of-refactoring-ui
If the work is a good match for your skills and personality it’s a really great way to make a fantastic living.
mcrittenden · 2020-12-07
From the tailwind homepage:
> "Best practices" don't actually work. I’ve written a few thousand words [0] on why traditional “semantic class names” are the reason CSS is hard to maintain, but the truth is you’re never going to believe me until you actually try it. If you can suppress the urge to retch long enough to give it a chance, I really think you'll wonder how you ever worked with CSS any other way.
[0] https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
FWIW, that linked post was the thing that convinced me to try it, and I haven't looked back.
lemonberry · 2020-11-18
One huge difference is that you can use media queries with TailwindCSS and you can't with the style attribute.
I think the best defense of Tailwind's approach is from Adam Wathan in this post.
https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
aarondf · 2019-11-16
IMO, this is one of the best articles on utility CSS: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
justaashir · 2019-10-30
Yup I love it too, it's my daily driver but I just read this article and this guy really changed my mind : https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
baxtr · 2018-11-02
Tailwind is really awesome. I switched from bootstrap in some projects and it’s been great. You gain a lot of flexibility in your designs
I recommend this post by Adam to anyone who is interested in learning more about utility first CSS.
https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
joecampo · 2018-09-27
I highly recommend you read: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
dmitriid · 2018-02-05
I also highly recommend this article, "CSS Utility Classes and "Separation of Concerns": https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
This helps you wrap your head around semantic-vs-layout CSS and Functional/Atomic CSS
fps-hero · 2026-05-17
Tailwind isn't just a framework; it's a design system.
The creators of Tailwind wrote the brilliant book "Refactoring UI" [0], which presents a systematic design system, introducing ideas such a type-scales, color-scales, spacing, and tactics to minimizes the cognitive burden on the designer by forcing design choices. The ideas presented in this book basically are tailwind classes!
When you build with Tailwind, everyone is speaking the same design language, and you end up with harmonious designs, even when components came from different projects or designers.
I disagree with the author's approach. It's basically just copying the utility classes from Tailwind and implementing them in an unergonomic way. Perhaps the best idea is component level CSS which is something that's been enabled by better tooling. I would implore anyone who doesn't really get Tailwind, to read the origin story [1].
[0] https://refactoringui.com/
[1] https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
renerick · 2024-11-22
After some experimenting I found that Tailwind works best with hybrid approach. The essay[1] is correct, that often you have one-of-a-kind blocks, like headers, footers, etc. that you can just fully implement with TW utilities, reducing cognitive load for class naming and structuring. But for more reusable elements, like buttons, links, inputs, popups, it's just much nicer to have them (and their variations) behind simple `btn btn-blue btn-small`. Even when using component-based approach, it's just much simpler to manage all those various states as explicit classes, rather than re-implementing CSS cascade in JS to determine how to combine corresponding TW utilities. I feel like if Tailwind Labs would be less radical in their marketing strategy, it'd receive a bit less of a backlash. Maybe :)
And I do agree, that moving to better integration with native CSS is a step in the right direction, very curious about future of v4
[1]: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
alex_lav · 2023-05-19
1. Positioning (yes even with flex) is unintuitive and painful
2. The fact that the !important tag exists, and at a broader level the fact that cascading exists
3. The community seems pretty hellbent on rejecting working solutions for being "bad". float: left is "bad". And yet, many/any other positioning systems are, to me, much worse. So to me, it's all "bad". Similarly, tables are the easiest way to position things correctly (since point 1, all other positioning tools are pretty bad), and yet, table-based-layouts are "bad". So again, it's all "bad".
More elegantly put:
- https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
- If you search "What's wrong with CSS y combinator", you'll get some derivative of this exact conversation over and over again for the past 15 years. CSS people saying "no it's good!", many other types of people saying "it's just too complicated and I don't want to keep doing it", followed by css people saying "no it's good!"
I think Tailwind is probably the closest approximation to tolerable CSS, but I also think its existence highlights a greater problem with both the community and the technology.
wiredearp · 2022-06-10
Tailwind is a multi million dollar business [1] and I've found that the only credible explanation is they they simply hire people to leave positive comments in popular forums. The backenders who bite on it will eventually despair and "upgrade" to Tailwind UI which is a paid product. If there are real frontenders who buy into this, they are from a segment that have not followed CSS for the last ten years while being young enough, not to remember HTML 3.2 which appears remarkably similar to Tailwind and indeed gave birth to CSS; which if it had been inventented today would be hailed it as a giant leap forward. Well, CSS is still being invented today, but since the latest tech maps badly to presentational classes [2] they will never know about it. I use Tailwind every day and it's a disaster.
[1] https://adamwathan.me/tailwindcss-from-side-project-byproduct-to-multi…
[2] https://web.dev/state-of-css-2022/
sandgraham · 2021-03-11
Why is it that Tailwind causes such emotional reactions in people? Functional CSS has been around a long time now.
When functional css ideas were introduced it presented a novel solution for scoping issues, naming issues and bloat issues. I remember discovering basscss and tachyons around 2015. The paradigm immediately felt like a huge improvement in my workflow. The iteration was so much faster than what I was used to with Bootstrap, BEM, or SCSS- I felt like I could design in code for the first time. My favorite workflow for web design became loading basscss in a CodePen, with almost no idea of the outcome I wanted and iterating towards something. What’s kind of amazing is that it allowed for these sorts of quick sketches and improved maintainability in large projects.
It also led me to my first inkling of a design system- through the use of composable and constrained styling primitives. A lot of the ideas introduced with those libraries now saturate the frontend ecosystem. And keep in mind, functional CSS, or at least the principles behind it have evolved a lot since 2015, particularly when it comes to components and CSS-in-JS. The original creator of basscss has gone on to create a number of equally impressive projects that advance the main ideas: styled-system, rebass, basically everything from @jxnblk.
I haven’t used Tailwind or any other functional CSS philosophy over the past few years since I find primitive and composable styling components, CSS-in-JS, themes,…
cteague · 2020-12-07
It's worth noting here that the issue isn't duplicated css, but duplicated html. Ideally, this is handled by some other templating / component library (e.g. React).
The idea is that if you have `bulletpoint__container`, that's going to be specific to this component only and hard to re-use in a different part of the application.
It seems like Tailwind's main value proposition is that it forces developers to select from a limited, pre-defined set of options in styling which can then be used as building blocks for components. It basically circumnavigates css entirely to the extent the page can be styled using Tailwind's options.
As far as I can tell, it's not really aimed at eliminating code-duplication per se. That should optimally be handled by whatever is generating your components.
This article https://adamwathan.me/css-utility-classes-and-separation-of-concerns/ explains it better.
hombre_fatal · 2020-12-07
Check out the Tailwind author's reasoning: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
I find it more compelling than I expected.
The truth of the matter is that as much as the idea of separation of html vs css sounds good, it's so hard that I rarely see it done. Without constant vigilance, you end up with premature abstractions, things you can't actually reuse, and an append-only accumulation of CSS.
The dream sounds good but leaves all the hard details for you to work out yourself. And frankly, after over a decade, I remain unconvinced and ready to look for new ideas.
Breaking the rule with Bootstrap since it first came out never stopped me from building great things, yet trying to obey the rule slowed me down and had me constantly refactoring CSS. It feels like a cargo cult.
We've been pointing to CSS Zen Garden for 17 years as an example of the benefits, but giving everything a class so that you can address it from a .css file isn't the hard part, and that's all the garden shows. The hard parts are organization, maintenance, coming up with a unified strategy, playing CSS whack-a-mole when you change HTML, deciding where to define what, finding where you defined what, etc. The garden demonstrates none of that.
abd12 · 2020-05-15
Thank you for your support!
The biggest advice I can give you is not about any specific tool, it's about an approach. You need to think about how you will market the book if you're self-publishing.
Engage with the community that will be interested in the book. Write articles, help out on Twitter, write code libraries, etc.
For me, I wrote DynamoDBGuide.com two and a half years ago over Christmas break. I wanted to just make an easier introduction to DynamoDB after I watched Rick Houlihan's talk at re:Invent (which is awesome).
That led to other opportunities and to me being seen as an 'expert' (even when I wasn't!). I got more questions and spent more time on DynamoDB to the point where I started to know more. I gave a few talks, etc.
I finally decided to do a book and set up a landing page and mailing list. I basically followed the playbook that Adam Wathan described for his first book launch.[0] Write in public, release sample chapters, engage with people, etc.
In terms of tooling, I used AsciiDoc to generate the book and Gumroad to sell. On a 1-10 scale, I'd give AsciiDoc a 5 and Gumroad an 8. But the tooling barely matters -- think about how to find the people that are interested :)
Happy to answer any other questions, either in public or via email.
[0] - https://adamwathan.me/the-book-launch-that-let-me-quit-my-job/
inopinatus · 2020-02-04
No, not custom at all. Quite the opposite - it's a well-curated set of standard classes. It's the focus on utility-based composition of style that sets Tailwind apart. For me the problem being solved is maintainability, recognising that CSS is tremendously brittle with regard to the application it serves and the context in which it is evaluated.
Probably best to read https://adamwathan.me/css-utility-classes-and-separation-of-concerns/ which does a much better job of explaining the motivations, and the conceptual journey of its creator, than I ever could.
Many folks (not all, but many, I'd even venture to say ... most) have a four step reaction to Tailwind:
1. That is the stupidest webdev idea I ever heard, and I've heard a lot. // 2. Fine, I'm trying it because everyone else keeps prompting me to and/or its creator seems competent. // 3. This is weird but actually quite helpful and totally not what I expected. // 4. You have ruined me for any other CSS framework and I never want to use anything else.
All CSS is crap. Tailwind is (in my experience and opinion) the least crap and most productive approach yet.
thinkloop · 2018-09-27
This [1] is one of the best articles I've read describing the issues and thought processes around the complexities of structuring css. But the suggested conclusions are exactly where I start to have problems. Take this recommendation for example:
.align-left {
text-align: left;
}
This is a very reusable class, of course, because it is literally just css but with a different name. But that's what always ends up happening. The lowest common denominator for reusability in css is so low, that you often end up with ridiculously simple classes like this, or close, basically re-inventing css with a different syntax. The new challenge becomes learning this new language and how to compose it.
The core issue with CSS is that it has divergent architectural characteristics simultaneously. On the one hand there are usually a set of extremely re-usable primitives: btn, normal-text, overlay, card, etc. Then very quickly, we get higher-level components/styles that are extremely not re-usable: order-form, contact-page, etc. And other stuff in between. Applying the same structural models to all of it will cause sub-optimality at some level.
To address this, I've found that applying different models to different aspects of the css most beneficial. Basically having a mix of both utility css, and semantic css. Low-level, highly re-usable components are defined in a utility fashion so that font-sizes, colors and other things are consistent throughout the site. And complex,…
darekkay · 2018-09-27
Wow, this gets some real hate on HN. I highly recommend reading [0] instead (which is by the way linked in the main article).
If you're writing HTML by hand, then yes, it will be a PITA changing all those "bg-blue" Profile Cards using functional CSS (while it's just a single change when using .profile-card instead). In reality, it's not the functional CSS being the issue, but the markup duplication. If I extract a real reusable ProfileCard component, I can apply functional CSS to it exactly once. If the color changes, it's just a single place I need to look into.
There is no silver bullet. If you design web sites, try some templating language to extract your components. If you develop web apps, take any modern framework like React, which enforces using reusable components. If you still prefer writing HTML by hand, then yes, functional CSS is not for you.
[0] https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
moralestapia · 2026-01-07
100%.
Also, https://adamwathan.me/tailwindcss-from-side-project-byproduct-to-multi…
"Boo hoo, I only made eight figures from this :'("
mpeg · 2026-01-07
Apparently they were 8+ people, in 2024 team size was 6 and were hiring 2 more [0] and in 2020 they had $2m+ ARR [1].
Honestly, while I feel bad for the people who lost their jobs the news aren't exactly surprising. Overhiring is a game for VC funded OSS like bun, not usually a good idea for bootstrapped companies.
[0]: https://tailwindcss.com/blog/hiring-a-design-engineer-and-staff-engine…
[1]: https://adamwathan.me/tailwindcss-from-side-project-byproduct-to-multi…
evilduck · 2024-09-08
I didn't like it at first glance either but Tailwind is very sane. Every not-Tailwind approach I've encountered over the last 20 years has laughably and without exception fallen into the exact same problems that led to Tailwind being created: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/
If you're a solo dev, sure, you're free to do anything you want and nobody will balk or complain about you causing them extra work or having to clean up a mess later. If you're on a small project and the CSS will fit onto a couple sheets of A4 paper, you also won't have enough volume of code to see major benefit because you could just rewrite an entire UI of that scope from scratch in a few hours. But on a team working with a larger codebase Tailwind solves real problems in maintaining styles across developers and over longer periods of time.
wauter · 2023-10-11
This article explains the reasoning pretty well:
https://adamwathan.me/css-utility-classes-and-separation-of-concerns/