Live data from Hacker News

Tailwind CSS v4.0 Beta 1

tailwindcss.com

61–70 of 135 posts

Re: Tailwind CSS v4.0 Beta 1

#61

I've never had as much fun doing front-end web stuff as I've had since I've picked up tailwind.

this is the honeymoon phase, wait until your package manager and transpiler is out of date, and your progressive web app framework is out of date, and your typescript version isnt compatible with the upgrade yet, and tailwinds isnt either or it is but none of the documentation is yet, but you have to upgrade because your CI/CD cant run your version of node anymore and now you have 100 flags across 5 configuration fil…

What do you think are the best option to avoid that? I was wondering what could I do with a project that I have that is a long lived code base, so we have some legacy parts.

Looking at the alternatives I was considering Vite with React and Vue plugins (and try to migrate my code so it works by default without any other configuration in Vite) or try Astro (because I have Vue and React) with their default configuration, but still not sure what would be the best option.

If it where just for me I would rather use React like framework (while I don't like that much React) but at least bun supports JSX out of the box and they seems to be working towards having a bundler integrated.

Re: Tailwind CSS v4.0 Beta 1

#62

Read some of the Getting Started documentation, for fun. First step: > Installing with Vite What the hell is Vite? Oh, it seems to be something you need to install via npm. I cannot help but to ask - why do we require npm, or Vite, for something that looks like it should "help" with CSS? Why is the webdev such a shitshow, that seems to get ever deeper into its own weird rabbit hole?

Aside from that the website also has a guide to install it with postcss, a tool I've never heard of before (forgive my intentional ignorance).

Re: Tailwind CSS v4.0 Beta 1

#63

Read some of the Getting Started documentation, for fun. First step: > Installing with Vite What the hell is Vite? Oh, it seems to be something you need to install via npm. I cannot help but to ask - why do we require npm, or Vite, for something that looks like it should "help" with CSS? Why is the webdev such a shitshow, that seems to get ever deeper into its own weird rabbit hole?

I agree with you in the general case, but many people are going to be using Tailwind as part of a build step, and many of those people will be using Vite to do that build. Two options down is the option to install the CLI, which does not require any other build tools. As for why it requires npm: I dislike the Node ecosystem as much as the next guy, but it’s a tool used for web development. Where else are you gonna in…

npm is for designed primarily for js dev. Many (most?) sites aren't written in js -- they're written in Java, C#, Python, PHP, etc.

Thankfully, tailwind is available directly as a downloadable binary. Unfortunately the link in their beta docs is buried, and also broken -- the correct link is here:

https://github.com/tailwindlabs/tailwindcss/releases/

Re: Tailwind CSS v4.0 Beta 1

#64

Read some of the Getting Started documentation, for fun. First step: > Installing with Vite What the hell is Vite? Oh, it seems to be something you need to install via npm. I cannot help but to ask - why do we require npm, or Vite, for something that looks like it should "help" with CSS? Why is the webdev such a shitshow, that seems to get ever deeper into its own weird rabbit hole?

What is the issue? Except you not being up to date with the ecosystem and complaining about it?

Why do I need a car key and worry about gasoline? I can just hop on a horsie and ride away!

Re: Tailwind CSS v4.0 Beta 1

#66
CSS first configuration is a good change! It seems like it would makes it easier to combine tailwind with regular CSS files which still uses the same design tokens. This is useful e.g. when creating a site with a component architecture where the components are styled with CSS, but some of the content comes from CSS or markdown.

Re: Tailwind CSS v4.0 Beta 1

#67
post #64

Read some of the Getting Started documentation, for fun. First step: > Installing with Vite What the hell is Vite? Oh, it seems to be something you need to install via npm. I cannot help but to ask - why do we require npm, or Vite, for something that looks like it should "help" with CSS? Why is the webdev such a shitshow, that seems to get ever deeper into its own weird rabbit hole?

What is the issue? Except you not being up to date with the ecosystem and complaining about it? Why do I need a car key and worry about gasoline? I can just hop on a horsie and ride away!

So Vite is a security measure against opportunistic theft? Theft of what?

Hey, I yearn for the days of good car analogies too. But the car key is not an essential part of the car experience, rather a necessity borne of the distrust of follow man.

Re: Tailwind CSS v4.0 Beta 1

#68

Earlier quoted context omitted.

CSS is text. What's wrong with copying the required CSS stylesheets over and including (importing) them from your own stylesheets? Surely we don't need a "package manager" and a "build chain" for this? Then again, I'm a person that writes any web-related code (HTML, JS, CSS, etc.) by hand. Where did we take the left-turn of not understanding how things work on the actual tech level? These tools hide all of the actual…

The number of tailwind classes is so large now that copy/pasting the whole set into your project would mean a huge bundle size. Part of that the tailwind package is doing is making sure that only the relevant tailwind classes are included.

So Vite builds a custom style sheet based upon the Tailwind classes that are actually used in the project?

Re: Tailwind CSS v4.0 Beta 1

#69

Read some of the Getting Started documentation, for fun. First step: > Installing with Vite What the hell is Vite? Oh, it seems to be something you need to install via npm. I cannot help but to ask - why do we require npm, or Vite, for something that looks like it should "help" with CSS? Why is the webdev such a shitshow, that seems to get ever deeper into its own weird rabbit hole?

Looks like you are not really familiar with how Tailwind works. And if you don't understand it of course Vite or a build step will look weird. But I suggest first getting familiar with the thing you are discussing to avoid adding misguided comments to the discussion that really don't add any value.

Though you are of course correct, I see no problem with somebody reading about technologies that they themselves don't use here on HN. I personally read HN to get familiar with new technologies that I may find useful in my work and private life. I first heard of OpenAI and Anthropic here.

Re: Tailwind CSS v4.0 Beta 1

#70

Earlier quoted context omitted.

The number of tailwind classes is so large now that copy/pasting the whole set into your project would mean a huge bundle size. Part of that the tailwind package is doing is making sure that only the relevant tailwind classes are included.

So Vite builds a custom style sheet based upon the Tailwind classes that are actually used in the project?

yes, exactly
Post reply on HN