←back to thread

Tailwind CSS v4.0 Beta 1

(tailwindcss.com)
159 points creativedg | 3 comments | | HN request time: 0s | source
Show context
notRobot ◴[] No.42211600[source]
I've never had as much fun doing front-end web stuff as I've had since I've picked up tailwind.
replies(6): >>42211697 #>>42211814 #>>42211834 #>>42211987 #>>42212105 #>>42212384 #
caustic ◴[] No.42212384[source]
Is tailwind better than CSS modules, and if so then why?
replies(1): >>42212574 #
1. agos ◴[] No.42212574[source]
they serve different purposes.

CSS modules is a (great) mechanism for providing isolation, very useful in the context of today's component-oriented front end development.

Tailwind provides some (quite good) building blocks for a design system, such as a palette, a sizing scale, values for shadows and rounded corners... and a vast set of classes to apply them. The set of classes covers basically every CSS feature, making it possible to slap everything in the class attribute of your HTML elements and never or almost never have to deal with CSS files.

In other words, CSS modules is a solution for those who love CSS and needed just a way to not deal with naming clashes without resorting to BEM. Tailwind is a tool for those who very much would like to avoid writing CSS

replies(1): >>42216456 #
2. EasyMark ◴[] No.42216456[source]
Maybe I should revisit this stuff. I’ve been fighting anything other than my own custom CSS classes for a while. It’s beginning to look at bit dated and I have no interest in rewriting them for the few sites that I support (family members and a couple of charities). I am no web guru and much prefer my hobby/day job of embedded stuff that you’ll never see on a GUI. I keep hearing great stuff about tailwind though.
replies(1): >>42217562 #
3. floydnoel ◴[] No.42217562[source]
i was all-in on simple hand-rolled CSS for the longest time but finally gave Tailwind a try because of a work project. it was a pleasure to use once i did.

i like to use it with DaisyUI also. the part i like is that all the classes i need are already written so its just putting pieces together.