Live data from Hacker News

Tailwind UI

tailwindui.com

91–100 of 367 posts

Re: Tailwind UI

#91
post #36

On the surface, the markup is pretty damn awful. But if you reach certain level of proficiency, this will definitely speed up development. Back End Developer Personally I would prefer Bootstrap over this approach.

You can move those clases into a css file.

button { @apply border bg-white; // ... }

Re: Tailwind UI

#92
Recently used Tailwind for a quick and dirty MVP. It came out looking very polished (way more so than the cookie-cutter bootstrap look) and cut down the development time quite a bit allowing more time to focus on the important stuff on the backend. Worth giving it a try on a side project if you haven't.

Like you, I was put off by how crowded the HTML looked but got used to it and found it way quicker to update and kept the css file clean.

Re: Tailwind UI

#93

Earlier quoted context omitted.

Their argument is that the idea of separating content from presentation was always a lie, and that your JS, CSS, and HTML code is always intertwined. I've found this to be partly true for web apps. Tailwind is essentially unusable without a build step. You can configure it to make composite classes for common styles (button, card, etc.), but if you buy into their philosophy you'll probably want a component-based desi…

>if you buy into their philosophy you'll probably want a component-based design (web components, React, Vue, etc). With tailwindcss or tachyons you get some of the benefits of component frameworks without having to use component frameworks, because you can colocate html & "styles" in regular template based systems and scope sections on a page this way. Great DX if you need to render sections conditionally, e.g. for a…

What if you want every link (from the perspective of the user, not based on the tag type) to have the exact same style? How would you do that without some sort of build step with an atomic unit for a link?

Isn't a section just a case of a component?

Re: Tailwind UI

#95

Shouldn't there be a possibility for one class to extend other or to somehow include or merge classes, such that btn = rounded + shadow + p-4? This would allow you to use utility classes as building blocks for semantic ones. (Disclaimer: I'm a backend dev and I don't know CSS well)

Yep, Tailwind offers the ability to create "components" that are pretty much rolled-up sets of classes like that.

Re: Tailwind UI

#96
post #13

Earlier quoted context omitted.

Is there a production-ready CSS purger that's not written in JavaScript? Last time I looked I couldn't find any. I'm not particularly against JavaScript, but I'm not willing to install and use npm and several hundred dependencies. All documentation for purgecss always includes postcss and a gazillion other packages I have never heard of. Maybe something in Go, as a single executable?

"but I'm not willing to install and use npm and several hundred dependencies" Good luck being a employable lol

Fortunately, there are many IT jobs that don't include any web work.

Re: Tailwind UI

#97

Earlier quoted context omitted.

Quite the opposite. It's a nice set of CSS variables. It still relies on much more CSS knowledge than a framework like Bootstrap. CSS frameworks are great because there is a flavor that should fit just about anyone.

It seems to require so much CSS knowledge that you might as well just use regular class names and write the CSS components yourself as it requires you to understand how flexbox etc works anyway to use it's utility classes properly.

You're right. Don't use Tailwind if you don't know CSS well.

The use case is for creating Template Components with something like React, Vue, Hugo, Razor or another component template framework. Tailwind offers a large list of customizable variables to use to help keep your CSS consistent. You're still pretty much writing CSS though, just with shortcuts. I consider it Emmet CSS + Variables. I also highly suggest using a plugin for your editor that offers hinting on all the crazy names no matter what CSS framework you use.

If you want a higher abstraction, Bootstrap or Foundation provide that. There is now also this Tailwind UI that you can purchase that would also provide that to some degree.

Re: Tailwind UI

#98
post #21

Earlier quoted context omitted.

> It's really nice, but is there something this pretty for bootstrap? I've always liked the Bootstrap 4 CodeBase theme ($28): https://demo.pixelcave.com/codebase/be_pages_dashboard.php It's not the same exact look of course, but it has dozens of pages, widgets and components that look clean. It's all well formed code too with ES6 JS, Webpack, etc..

Wow, that one is pretty nice... Do you have any experience plugging this into, say, a react app? Fairly simple?

I haven't tried it with a React app but I have used the theme for one of my projects that's using SCSS, Webpack and ES6 JS. The docs are really good and everything is segmented nicely. It shouldn't be bad to get it set up with React.

Re: Tailwind UI

#99

Great job, this looks awesome! I wish something polished like this was around when I started my stuff. I'm not sure how I feel about Tailwind being almost 1mb of CSS :D, but it's probably worth all the time you save, especially for apps the size isn't such a big deal.

Tailwind is often paired with another build tool called PurgeCSS which eliminates any unused classes.

Re: Tailwind UI

#100

Earlier quoted context omitted.

In my experience trying to do semantic CSS just adds a lot of extra cognitive overhead and breaks down in the inevitable requirements churn every project goes through. I was skeptical of Tailwind too until I actually tried it. It’s one of those things like JSX that defies received wisdom but in real use is very nice.

> In my experience trying to do semantic CSS just adds a lot of extra cognitive overhead. Do people really struggle with this? Heading Tagline It far more straight forward just to call something what it is and you can actually read the CSS afterwards.

This is so much easier to parse too. If you need more rigidity, add BEM on top then you're good to go.
Post reply on HN