News for hackers. Stuff that matters.
Re:Why I don't like Tailwind CSS by frob on Thursday March 11, 2021 @03:26PM (#26428599)
Tailwind brings with it the same issues that css-in-js does: the inability to just reload css curing the development cycle. When working with css (or a language that complies to css), any changes to the style are pushed to the browser without a page refresh. With tailwind and css-in-js, changes to style require changes to js/html and therefore require an entire page reload which both slows down my feedback loop and breaks any state I had established in my test app.
Re:Why I don't like Tailwind CSS by werm82 on Thursday March 11, 2021 @03:46PM (#26428819)
Not sure what your setup is, but I'm using tailwind with create-react-app and craco[1], and the changes show up without needing to reload.

[1] https://github.com/gsoft-inc/craco

Re:Why I don't like Tailwind CSS by frob on Thursday March 11, 2021 @04:05PM (#26428994)
You can update the tailwind css files as much as you like, but as far as I know, adding or removing class names will trigger a reload.
Re:Why I don't like Tailwind CSS by fokinsean on Thursday March 11, 2021 @03:38PM (#26428729)
> With tailwind and css-in-js, changes to style require changes to js/html and therefore require an entire page reload

ah!! I was wondering why HMR wasn't working like I remembered the first time I used React. I think the first time I picked up React I used plain CSS, and the CSS would change on the page without reloading. Now I'm using tailwind and material-ui and thought HMR was just busted.

I like tailwind but it doesn't play well with material-ui. Material components always take precedence which is super annoying. I might just end up canning tailwind.

Re:Why I don't like Tailwind CSS by dawnerd on Thursday March 11, 2021 @03:28PM (#26428625)
If you use Next.js it's not really an issue but you're right, that is pretty annoying.
Re:Why I don't like Tailwind CSS by richeyryan on Friday March 12, 2021 @04:47AM (#26433877)
I use Tailwind with Snowpack and style changes are picked up without a page reload.
Re:Why I don't like Tailwind CSS by jms55 on Thursday March 11, 2021 @04:31PM (#26429253)
I used Tailwind in my Phoenix LiveView project, so I don't need to reload.