Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Based on what you've said, you're right, you don't understand it...the things you're comparing it to don't really make sense. Bem doesn't make sense to compare and neither do css modules. Tailwind is a stylesheet with css classes that do atomic things like changing border radius. It gives you a set of classes that allow you to build just about anything you need with just classes. When you compile an app that uses tailwind, it takes just the styles you use and puts them into a single stylesheet. So all of the things you claim to be wrong with tailwind aren't true. Tailwind is very performant because you only use the styles you need. It uses css variables for theming so there's no need to implement it in userland. It also uses css variables to do transforms which is very important because transforms are not additive in css yet. Even if you don't end up liking tailwind, the thing is executed really really well from the ground up.


I (not OP) get all of these, incl. the relief of not naming things.

But I still prefer naming things to the class soup and the excessive repetition.

ITCSS (Inverted triangle CSS) works with the cascade and results in clean, minimalistic CSS files.

I do not build SPAs though and do get that quick styling works really well for that scenario.

I do import Tailwind colors, spacing and sizes in SCSS maps for easy access and do like the standardized approach.


> ITCSS (Inverted triangle CSS) works with the cascade and results in clean, minimalistic CSS files.

The real Tailwind lightbulb for me was understanding that the cascade and actual CSS files don't matter anymore - you don't need them. No more inheritance, no more naming, no context switching.

I'm a big fan of ITCSS and was using Harry's methods before he coined the name but we don't need to fight the cascade any longer.

> I do not build SPAs though and do get that quick styling works really well for that scenario.

Admittedly, if you're not breaking down your UI into small components then Tailwind will get real messy, real fast.


Using Tailwind @apply to compose utilities into classes is a wonderful feature and gets you the best of both worlds! :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: