Re:Tailwind V4 Is Finally Out
by jitl on Friday January 24, 2025 @07:27AM
(#42812464)
pointless make-work compared to inline-styles-like workflow like tailwind, if you have a component framework
[ Parent
| on HN ]
Re:Tailwind V4 Is Finally Out
by 8n4vidtmkvmk on Saturday January 25, 2025 @02:29PM
(#42823991)
You might like Styled Components then, if you're using React anyway. Not sure if there's similar systems for other frameworks. I don't consider it pointless make-work to develop a consistent stylesheet to use throughout your app though.
Styled Components is too low-level (let’s name every div!!!) and comes with a substantial performance cost. Tailwind is a much better option.
Re:Tailwind V4 Is Finally Out
by 8n4vidtmkvmk on Sunday January 26, 2025 @01:24PM
(#42832419)
> a substantial performance cost
I believe the Babel plugin eliminates most of the performance cost.
The naming is double-edged. Often you want to re-use your styled element, so the fact that it has a name from the get-go makes that really easy. But you're right, sometimes it's annoying to pull bits out that you didn't really want to.
Ultimately I went back to CSS Modules. I just don't understand why I'd want to the appeal of Tailwind.. I'd have to learn a new DSL that ultimately gives me less control.