Tailwind's awesome. I'm switching away though.
Show notes
Website: https://maximilian-schwarzmueller.com/
Socials: 👉 Twitch: https://www.twitch.tv/maxedapps 👉 X: https://x.com/maxedapps 👉 Udemy: https://www.udemy.com/user/maximilian-schwarzmuller/ 👉 LinkedIn: https://www.linkedin.com/in/maximilian-schwarzmueller/
Want to become a web developer or expand your web development knowledge? I have multiple bestselling online courses on React, Angular, NodeJS, Docker & much more! 👉 https://academind.com/courses
Show transcript
00:00:00: For some of the new projects I'm working on, for most of my new projects
00:00:04: I'm working on now these days, I actually switched away
00:00:08: from Tailwind. I'm not using Tailwind in those projects
00:00:12: also not ShadCN, therefore. And there is a reason, and the reason
00:00:15: is not that Tailwind is bad, of course. Quite the opposite.
00:00:19: It's an amazing library, I wanna be very clear about that.
00:00:22: And I kind of also feel bad about making this video, this episode here,
00:00:26: because only a few weeks ago, I talked about the huge financial
00:00:30: problems Tailwind was facing back then.
00:00:33: Now, since then, thankfully, things got way better, many new
00:00:36: sponsors jumped onboard and now I think they're in a much better
00:00:40: financially, because, of course, obviously, Tailwind is amazing
00:00:43: and there are people working with a lot of heart and
00:00:47: energy on that project. And my point is not that it's bad or
00:00:51: I wanna convince anybody not to use it.
00:00:54: I mean, I'm just using this channel to share my
00:00:58: and some insights into how I work, so I thought that might be
00:01:01: interesting. So why am I not using Tailwind then
00:01:04: amazing? Well, I gotta take a step back.
00:01:08: A couple of years ago, before we had the AI
00:01:12: revolution or before AI got that good at
00:01:15: coding, I used Tailwind like most people, I guess, most
00:01:19: developers everywhere. For one main reason, though.
00:01:22: Because it allowed me to iterate quickly on the
00:01:25: code. You know, I never really used Figma or other
00:01:29: tools like that, also, of course, because I'm in the situation
00:01:33: working alone, and if I'm working alone on my projects,
00:01:37: really have to use those design tools.
00:01:39: For me, it always was quicker to iterate on designs just
00:01:43: code. I could write code, and with Tailwind, since you have your
00:01:47: classes inline in your DOM, in your JSX code, you could quickly
00:01:51: update that code, update those styles and try
00:01:55: out different styles, try tweaking that margin.
00:01:58: And that was just a- a very, very efficient flow.
00:02:02: And that was the main reason for me, and maybe also for some other developers,
00:02:05: I was using Tailwind. I know for a decent
00:02:09: amount of other developers, maybe the majority, another strong reason
00:02:13: is that they just hate CSS. I know CSS is not popular
00:02:17: amongst web developers and I get why.
00:02:19: It can seem very complex, there are hundreds and
00:02:23: thousands of properties and values and, yeah, it- it
00:02:27: can be daunting. Now, I will say, though, modern
00:02:30: CSS has come a long way. Many things are easier now
00:02:34: than they were in the past. I mean, Flexbox is not new at
00:02:38: all anymore, but it made a lot of things easier.
00:02:41: And now think of Flexbox in other areas where
00:02:45: deriving colors got way easier than it used to be.
00:02:48: You have relative colors now in CSS.
00:02:50: And by the way, on my Academy channel I launched a couple
00:02:54: about modern browser and CSS features, like colors and relative
00:02:58: colors or the container queries, which are also amazing for
00:03:01: building dynamically, uh, resizable
00:03:05: components that don't depend on the viewport but on the space that's
00:03:09: available to the component. So CSS has come a long way.
00:03:12: Now, the thing is, you can use all these modern CSS features
00:03:16: also with Tailwind essentially, or most of them, but
00:03:20: you can also write vanilla CSS and you can do that even
00:03:24: easier now with AI, of course, because even if you hate using
00:03:27: CSS, knowing about certain features and their browser
00:03:32: support can be enough You can point AI at the features you want it to use,
00:03:35: at some docs, some MDN articles that explain those features, and
00:03:39: AI can write the code for you. You might wonder why you would do that,
00:03:43: why not just use Tailwind? I mean, it has all these modern features
00:03:47: too. For one and a half reasons, I would say, at least for
00:03:51: me. The less important reason is that
00:03:54: Tailwind might not always support all of the latest features,
00:03:58: and more importantly, AI certainly doesn't know about
00:04:02: all Tailwind features. I mean, Tailwind ha-
00:04:06: but AI doesn't use all of them. It always uses the same
00:04:10: few classes, and often even an old class syntax,
00:04:15: so you're missing out on certain features here.
00:04:16: Now, the same can happen for you if you are using vanilla CSS, of course.
00:04:20: If you don't tell the AI to use a certain feature, it just might not.
00:04:24: But you can learn about the few most important CSS
00:04:28: features you wanna use and then tell AI to do so, but of course,
00:04:31: point, you could also do the same for Tailwind
00:04:35: use certain Tailwind features. Uh, it just might be easier to just name
00:04:39: a couple of key CSS features than Tailwind
00:04:43: classes, but again, that's not my main point.
00:04:46: My main point is that I have always tried to
00:04:50: reduce the- the amount of libraries I use in my
00:04:54: and the- the reason for that is twofold.
00:04:57: For one, I create educational content, so I'm used
00:05:00: to, uh, external or extra libraries being a
00:05:04: bad thing, because if I create a course about React,
00:05:08: use Tailwind, if there is a breaking change in Tailwind, a lot
00:05:12: of parts of my code, uh, or of my course suddenly start breaking
00:05:16: get a lot of questions by students, even though the main topic, React,
00:05:20: have changed I get that this is a very niche problem that
00:05:24: affects me, but not most web- websites though.
00:05:27: But even if you're building a normal website, having
00:05:31: as little third party libraries in there as
00:05:35: poss- uh, possible and reasonable is a good idea, I would argue.
00:05:39: Now, I will also say that it's not a good idea to absolutely
00:05:43: force every library out there. There is a good reason to use
00:05:47: certain libraries. I mean, if you're using, uh,
00:05:50: a rich text editor, using something like TipTap makes a lot of
00:05:54: say, because you can build your own editor.
00:05:57: Now with AI it's easier than ever to some degreeBut you
00:06:01: will also run into a lot of edge cases or problems you then have to
00:06:04: solve yourself, with AI sure, but also AI doesn't get everything
00:06:08: right. You know that if you worked with it.
00:06:10: So there are reasons to use third party libraries.
00:06:14: I'd just say that styling, as I explained, is something that is
00:06:17: actually replaceable. Again, not saying that everybody should be
00:06:21: doing it, but for me that works quite well and therefore
00:06:24: library that I can get rid of because I
00:06:28: don't mind reviewing the CSS code,
00:06:32: uh, AI gives me and fixing
00:06:35: CSS and styling problems with raw CSS when things go wrong
00:06:39: because, of course, things will go wrong (laughs) at some
00:06:43: using AI. But I don't mind that. If you absolutely hate
00:06:47: looking at CSS code, that will not be an option for you,
00:06:51: But for me, I therefore can get rid of the Tailwind
00:06:55: I can get rid of ShadCN for example, because I built my own components
00:06:59: and ShadCN of course is not a traditional library but it does
00:07:03: use Radix UI under the hood, a library which has
00:07:07: a questionable maintenance status, uh, now as
00:07:11: far as I know. So there you then have the actual
00:07:14: problem why I wanna white libraries even when not talking
00:07:18: about educational content, if it makes sense.
00:07:21: Every library you add to your project can also become a
00:07:25: liability if it stops being maintained.
00:07:28: At that point, security issues might not get fixed
00:07:32: anymore. Bugs might not get fixed anymore.
00:07:34: Styling bugs, for example, with Tailwind.
00:07:37: New features might not be added anymore.
00:07:39: If there is a new CSS feature and Tailwind weren't maintained anymore,
00:07:43: course it is, but if it weren't maintained anymore,
00:07:47: use that feature. And, I mean, we kind of were close with
00:07:51: Tailwind. That video which I created where I talked about their
00:07:55: problems, there is a post by the main Tailwind
00:07:59: says if they can't figure out this financing problem, Tailwind
00:08:03: might become abandonware. Maybe that was a bit drastic,
00:08:06: maybe also done to get more attention, but
00:08:10: nonetheless one problem you always have with most third
00:08:14: party libraries is that they might not be maintained anymore
00:08:18: future, depending on who's working on them in the
00:08:21: And that's why I personally like using vanilla CSS again.
00:08:25: Also, and that's important here because I always
00:08:28: so, and again I can't emphasize it enough,
00:08:32: I want all the best for Tailwind and I'm still using it
00:08:35: in, in many projects. It's not like that. I don't hate it.
00:08:39: It's just one thing where I'm experimenting with not using it in some
00:08:43: projects and no matter if that's Tailwind for you
00:08:46: different, I just would... And, and that was true before the
00:08:50: AI era too. I would always consider twice before using
00:08:54: party library. There are many good reasons to use them.
00:08:56: For example, BetterAuth for authentication is amazing.
00:08:59: I would definitely do that. But if there is a library you can
00:09:03: replace, it might be worth a second look or
00:09:07: thought, I guess
New comment