Live data from Hacker News

Vanilla JavaScript support for Tailwind Plus

tailwindcss.com

111–120 of 202 posts

Re: Vanilla JavaScript support for Tailwind Plus

#111

Lovely. Verbosity aside, now on top of knowing CSS you need to learn another hierarchical system within class names.

I just can't fathom how someone can look at this and think "yeahhhh thats some good clean code". How did tailwind get so popular? Learn plain CSS. It's really good now

I like how tailwind provides scoping automatically. But in projects already having a build system I use css modules. Writing pure CSS is so much nicer but please don't make me manage class names myself.

Re: Vanilla JavaScript support for Tailwind Plus

#112
post #80

Earlier quoted context omitted.

Yes I agree - it's nice to be able to see exactly what's happening without needing to dive into a rats nest of fragile CSS cascades.

This is literally a rats nest of css cascades.

Its atomic though, which is easier for some to reason about. I use devtools.

Re: Vanilla JavaScript support for Tailwind Plus

#113

Earlier quoted context omitted.

I've worked in many different FE codebases with a variety of CSS "strategies". This sort of thing is objectively ugly and takes a minute to learn. The advantages of this approach I found is two-fold 1. You can be more confident that the changes you are making apply to only the elements you are interested in changing You are modifying an element directly. Contrast with modifying some class that could be on any number…

Agree, and to add…the “component” still needs to exist somewhere in the system for tailwind to make sense. No one is writing a long paragraph of styles for _every_ button in their app.

> No one is writing a long paragraph of styles for _every_ button in their app.

Very much not true. LLMs love doing this!

Re: Vanilla JavaScript support for Tailwind Plus

#114

Earlier quoted context omitted.

Groups are great. It lets a child element activate an effect on a parent element. Hover This eliminates the need for JS for a wide range of things.

But at what cost? If it’s not a CSS builtin, it’s going to use JS - it may not be something you care about, but it will be there. There’s no other way.

Tailwind compiles all the inline stuff to CSS, and this works in plain CSS. It’s just allowing you to define that inline, which you wouldn’t be able to do with inline styles.

It’s the same as how they enable media queries for example, they’re not using JS just plain CSS, but they’re making it available with these inline classes.

Re: Vanilla JavaScript support for Tailwind Plus

#115
I've been working with TW more lately and I must admit - there is a convenience factor there that is really nice - and it abstracts a lot of the finicky design system thinking.

But, if you're building any long-term product, investing in your own design system + component library will put many many more miles on the board in terms of DX, flexibility, aesthethic language, dependency footprint, etc.

Re: Vanilla JavaScript support for Tailwind Plus

#116

This is great. Last time I looked into this UI component world I was surprised the popular UI libraries weren't all 'headless' at their base. Web components have been around a long time now. What was stopping this approach? There are so many framework specific libraries like shadcn, and the community set about building half finished conversions for different frameworks like Vue, which are always several iterations be…

Put simply: if you’re using something like React, Vue, Svelte, whatever, then Web Components are strict overhead in terms of bundle size and runtime overhead. And when there’s impedance mismatch between the two worlds, which I hear is particularly common in React (can’t attest it personally, I don’t use React), you have to compromise on functionality or ergonomics, or else do fancier bindings, at which point why even…

Here's my put simply:

We've got some UI components built with html, CSS and JavaScript. They use web standards.

We want to add them into web frameworks that are built in JavaScript. They are built for html, CSS and JavaScript.

No need to overcomplicate things.

And for a universal component library I'll happily accept 7kb extra overhead in my 4mb React slop website

Re: Vanilla JavaScript support for Tailwind Plus

#117

Earlier quoted context omitted.

Fwiw I feel like their components are something I'd be less likely to want to pay for now that you can generate tailwind components so easily with ai. I guess now that I think of it I actually paid for them back when it was called Tailwind UI, but instead of using them I'm just telling claude to generate a UI for me, which has the advantage that there's no licensing issues. It'll be interesting to see how their busin…

How has shipping high quality products using AI generated tailwind components actually been working for you? I think the problem that I and many others have/had, is that it can certainly build a few components that look good in isolation, but it doesn’t do a good job at maintaining a cohesive theme/idea across many different page sections/components etc. I built blendful [0] to solve this, and sort of lost interest w…

I'm not there yet, but I wouldn't say I've ever shipped anything with a high quality cohesive frontend. In general though, don't people usually ditch these component libraries and write their own set of components once they reach a certain point?

Re: Vanilla JavaScript support for Tailwind Plus

#118

Earlier quoted context omitted.

I just can't fathom how someone can look at this and think "yeahhhh thats some good clean code". How did tailwind get so popular? Learn plain CSS. It's really good now

I've worked in many different FE codebases with a variety of CSS "strategies". This sort of thing is objectively ugly and takes a minute to learn. The advantages of this approach I found is two-fold 1. You can be more confident that the changes you are making apply to only the elements you are interested in changing You are modifying an element directly. Contrast with modifying some class that could be on any number…

1. Aren't there good tools that can list all the elements a style would be applied to so that you can pick and change only the ones affecting the element you need?

Re: Vanilla JavaScript support for Tailwind Plus

#119

Lovely. Verbosity aside, now on top of knowing CSS you need to learn another hierarchical system within class names.

Oh yeah, when I open a typical big project with Tailwind I always love to see some:

  
  
    Team Settings
  
  Manage your team permissions, invites, roles, and integrations here. Changes apply instantly across all team workspaces.

Cancel Save Changes
Post reply on HN