←back to thread

Tailwind CSS v4.0 Beta 1

(tailwindcss.com)
159 points creativedg | 5 comments | | HN request time: 0.001s | source
Show context
that_guy_iain ◴[] No.42211038[source]
I'm really curious as to why they felt the need to work on improving performance.[1]

Were people complaining it was too slow? Were the performance improvements just the benefit of refactoring they did for other reasons?

Considering the build happens once during your build phase, taking under half a second doesn't seem like something I would even bother looking at. So it just jumps out to me, so I'm just curious.

[1] https://tailwindcss.com/docs/v4-beta#new-high-performance-en...

replies(5): >>42211115 #>>42211179 #>>42211209 #>>42211283 #>>42211498 #
1. sodapopcan ◴[] No.42211115[source]
No idea if anyone was complaining, but if building in CI it shaves off some pennies (or more?) no?
replies(1): >>42211399 #
2. teaearlgraycold ◴[] No.42211399[source]
Given its popularity this can actually get into measurable carbon emission savings. Not world changing. But maybe a few international flights over the lifespan.
replies(1): >>42212062 #
3. Sesse__ ◴[] No.42212062[source]
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.
replies(1): >>42213135 #
4. yurishimo ◴[] No.42213135{3}[source]
Have you examined the build artifacts of a site using tailwind? The size of the CSS is often smaller than the same styling in "normal" hand written CSS. There are a dozen blog posts from large engineering orgs that have confirmed that switching to Tailwind slimmed their builds down. Shopify has been a big proponent of Tailwind and they are absolutely obsessed with shipping as little code as possible because of the scale they operate at.

Also, browsers are insanely good at parsing and applying CSS. You need hundreds of thousands of unique selectors before the browser takes more than fraction of a second to parse and render an entire CSS file.

https://www.trysmudford.com/blog/i-spent-a-day-making-the-we...

replies(1): >>42213186 #
5. Sesse__ ◴[] No.42213186{4}[source]
Yes, I have. I work on browser CSS performance.