Live data from Hacker News

Tailwind CSS v4.0 Beta 1

tailwindcss.com

41–50 of 135 posts

Re: Tailwind CSS v4.0 Beta 1

#42
post #38

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

I don’t work on the frontend very often, I think the last time I did so was when bootstrap was “the tailwind”, but when I recently had to cover for one of our react developers I got to work with it. I genuinely didn’t think there was a difference in my work flow between the two. Looking up meta language magic in the official documentation and then using it through brute-force development. Maybe I’m missing something,…

Bootstrap is so much worse because of all the nested CSS styles. One of the big benefits of utility classes is that they’re relatively isolated to one element (with a few exceptions like tailwind’s group classes). This has a lot of benefits like eliminating spooky action at a distance and making elements so independent they can just be copy pasted between Tailwind projects.

If you’re brute forcing Tailwind then you need to study CSS fundamentals. The vast majority of its utility classes are essentially 1:1 translations of CSS properties with some syntax sugar and DX improvements. Translating them to custom classes is a mechanical process even without @apply. There are even browser extensions like Windy that can rip HTML elements with arbitrary CSS to Tailwind classes.

Re: Tailwind CSS v4.0 Beta 1

#43

Earlier quoted context omitted.

No idea if anyone was complaining, but if building in CI it shaves off some pennies (or more?) no?

Given its popularity this can actually get into measurable carbon emission savings. Not world changing. But maybe a few international flights over the lifespan.

The carbon cost of a bloated CSS framework isn't the build time, it's the billions of times the resulting CSS has to be parsed and applied on the web pages where it's used.

Re: Tailwind CSS v4.0 Beta 1

#44

Earlier quoted context omitted.

or just use bun? used to also face all these issues - but with bun it's mostly gone for now (and for newer projects) - hope it stays that way!

Or just use CSS. Never had any of those issues.

Always the right choice!

Re: Tailwind CSS v4.0 Beta 1

#45

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

I feel the same. I tried many css solutions over the years and always made a mess.

Tailwind is by far the first time I'm productive with styling.

I'm impressed with everything they've built.

Re: Tailwind CSS v4.0 Beta 1

#46
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?

Re: Tailwind CSS v4.0 Beta 1

#48

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?

Generally use the standalone tailwind CSS CLI tool for keeping things lean. Sadly the download link from the "Getting Started" page https://github.com/tailwindlabs/tailwindcss/releases/tag/v4.... is broken.

Shows that the "bloated" way of doing things is now the norm.

Re: Tailwind CSS v4.0 Beta 1

#49

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 install it from?

Re: Tailwind CSS v4.0 Beta 1

#50

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?

Because if you are working with CSS, there’s a decent chance you’ll be using npm and/or Vite, and it’s convenient to integrate your tools to save yourself time. Don’t like it, pick another installation method, like the standalone CLI build option, that needs neither.
Post reply on HN