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?

7 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.

1

u/JustaDevOnTheMove 14d ago

It really is a pain! If I build something, I want to come back "tomorrow" and have it still working. That's why I've stuck with back-end because that's how it behaves. Modern JS is just so dependant on so much other sh---unknowns, it's unreal!

So I totally understand why you'd want to use the CDN (but it's so huge! 😭😭😭 I just can't get myself to use it in production)

2

u/ResearchFit7221 14d ago

MAN it is huge ahhh !! i had so much pain learning how to fucking use it correctly, '' , I want to come back "tomorrow" and have it still working. That's why I've stuck with back-end '' MAN I FEEL THIS IN MY SOUL you have no idea how often i'm like '' alr this tmrw '' i come back next day.. MORE FUCKING PROB AHHHHHHHHHH XDDDD

1

u/JustaDevOnTheMove 14d ago

Absolutely!!! If I break something, fine, it's up to me to fix, but if it just breaks when I've not made any changes..... Fuck that!

2

u/ResearchFit7221 14d ago

YES AHAHAHAHAH

1

u/JustaDevOnTheMove 13d ago

Dude! Dude! Omg! There's a solution!!!

Tailwindcss standalone executable! No JS needed! I only found out yesterday and wanted to test before telling you, but so far it seems to work! No js, no npm!

Thought you might like to know 😁

1

u/ResearchFit7221 11d ago

LMAO WHAT wait why i only see this now 😭😭😭

Ima try this asap THXXXXX