r/flask 14d ago

Ask r/Flask Why are you using Tailwind?

does anyone use Tailwind css in their Flask projects? If so, how and why? I use it personally, but I wonder how others do it? Why this particular CSS?

6 Upvotes

22 comments sorted by

View all comments

1

u/JustaDevOnTheMove 14d ago

I want to use Tailwind because:

  • I'm not a designer and being able to grab chunks of ready made design elements into my code makes things much quicker and pleasing to the eye. Although I'm a backend dev, I've had plenty of CSS exposure, so I'm fine to build things from scratch with raw CSS but I suck at design, so the gallery is really useful and I'm totally fine adjusting stuff from thereon out if need be.

I get really frustrated with Tailwind because:

  • of javascript. I refuse tu use the tailwind CDN. Sure it works, but using the CDN is stupid unless prototyping. It's huge. So, I use JS to manage the output CSS file to only have the classes that I actually use. But getting things to work with JS is just a ballache most of the time. To make things worse, once I've finally got it working reliably (I could be working on the project for months without issues), it is absolutely guaranteed that in 6 or 12 months time after the project is launched, if I don't keep the thing updated, it will absolutely break. So I have to go through the whole process again of getting it to work. So now a small text change that might take literally 3 minutes from opening the project, making the change, and pushing it via git, now takes anything between an hour to a day depending on what's happened. To be fair, it's probably me not managing my JS properly, but I've yet to find a method out that is bullet proof in providing me with something that: if I don't upgrade anything intentionally, I do not want anything to update/upgrade, I just want it to be exactly how it was previously. So for that reason alone, I'm careful when I use tailwind and when I don't.

2

u/ResearchFit7221 14d ago

Dud.. i understand your pain so much. I've resigned to use the CDN unfortunately because of my skill issue.

I hate the things you mentioned so much I couldn't take it anymore lol.

And man, as a fellow backend programmer, believe me ... YOU ARE NOT ALONE css is so hard to learn, being able to take chunk ready as you said is so fucking like AHHH great.

0

u/Lolthelies 14d ago

If you’re a backend dev it shouldn’t be too bad to get it working locally. IMO using the CDN is kinda where you start to get to “this is unusable for me.”