Live data from Hacker News

Play with TailwindCSS in the Browser

play.tailwindcss.com

11–20 of 300 posts

Re: Play with TailwindCSS in the Browser

#13
post #9

Am I only one that feeling like code readability is a bit gross?

Usually you build reusable components with tailwind, so that you archive DRY. With React for example (or any other technology).

The huge benefit is, that you don’t split up HTML and CSS, you only write HTML.

Re: Play with TailwindCSS in the Browser

#14
post #9

Am I only one that feeling like code readability is a bit gross?

Plain HTML yes.

Using a web framework? No.

It is clever in that half of it is missing: the componentisation that React (etc.) brings with it makes this shine.

You can also define normal CSS classes based on the utility classes if you so wish.

Tailwind after 4 hours of learning curve is so much nicer than cutting css or using old skool css frameworks. Some of that is because ready designed components exist that you can copy.

With an old skool css framework once you hit an edge case you can be snookered and spend ages diagnosing why because of some clever stuff they done.

Tailwind says “yeah css was a bad idea, let us abstract it away a bit” and does a nice job.

Re: Play with TailwindCSS in the Browser

#16
Im sorry but I don’t understand how anyone can look at that and think it’s a good way to build UIs. I’m almost certainly in the wrong, considering how popular this library seems to be getting, but holy heck that looks like a tedious mess to work with. It’s like you have to learn every raw CSS selector, and then also learned how it’s represented in Tailwind, and then scatter that all over your markup.

Re: Play with TailwindCSS in the Browser

#17
post #16

Im sorry but I don’t understand how anyone can look at that and think it’s a good way to build UIs. I’m almost certainly in the wrong, considering how popular this library seems to be getting, but holy heck that looks like a tedious mess to work with. It’s like you have to learn every raw CSS selector, and then also learned how it’s represented in Tailwind, and then scatter that all over your markup.

I'm with you. I'm pretty into neat experimental frontend + css stuff, and I'm baffled by how passionate Tailwind's fans are. It always feels like there's something I'm missing.

In all fairness, I've never actually tried it.

Re: Play with TailwindCSS in the Browser

#18
post #16

Im sorry but I don’t understand how anyone can look at that and think it’s a good way to build UIs. I’m almost certainly in the wrong, considering how popular this library seems to be getting, but holy heck that looks like a tedious mess to work with. It’s like you have to learn every raw CSS selector, and then also learned how it’s represented in Tailwind, and then scatter that all over your markup.

> It’s like you have to learn every raw CSS selector, and then also learned how it’s represented in Tailwind, and then scatter that all over your markup.

In my experience, tailwind is pretty close to the real CSS properties. What I found to be wonderful and freeing about it is that it stops the middle step of engineering and naming classes and naming elements with class names and let's you just do styling. There's also a really great plugin for VS code that adds intellisense. Personally I found the modifiers that allow you to target pseudo selectors like :hover to be a superpower. I totally understand the other side of the argument though. It's a lot.

Re: Play with TailwindCSS in the Browser

#19
post #16

Im sorry but I don’t understand how anyone can look at that and think it’s a good way to build UIs. I’m almost certainly in the wrong, considering how popular this library seems to be getting, but holy heck that looks like a tedious mess to work with. It’s like you have to learn every raw CSS selector, and then also learned how it’s represented in Tailwind, and then scatter that all over your markup.

I'm with you. I'm pretty into neat experimental frontend + css stuff, and I'm baffled by how passionate Tailwind's fans are. It always feels like there's something I'm missing. In all fairness, I've never actually tried it.

You should give it a shot, but IMO what makes it worth it is the Tailwind Intellisense plugin. I can design an element in just a few keystrokes, it's amazing.

Re: Play with TailwindCSS in the Browser

#20
post #16

Im sorry but I don’t understand how anyone can look at that and think it’s a good way to build UIs. I’m almost certainly in the wrong, considering how popular this library seems to be getting, but holy heck that looks like a tedious mess to work with. It’s like you have to learn every raw CSS selector, and then also learned how it’s represented in Tailwind, and then scatter that all over your markup.

You have to learn the browser layout model, yes - you need to know what flexbox is, or how padding or transforms or line height works. But Tailwind provides sensible defaults for how those things are applied, which removes a lot of potential for screwups. It also removes most of the potential for badly “architected” CSS, where you accidentally end up with a set of classes that don’t compose together in a predictable fashion. This greatly lowers the cognitive burden, which helps when collaborating with others or even with your past and future self.

I get that it is aesthetically ugly, but if you can stop caring about that then you might find that it’s better on most other dimensions.

Post reply on HN