1
Update: How I used to write CSS vs. now after 6 months of Tailwind
Back in March I was still hand-writing all my CSS classes for a small project, with tons of media queries scattered everywhere. Then I tried Tailwind on a client site in July because they specifically asked for it. At first I hated the long class names in my HTML, but after about 3 weeks it clicked and my styling got way faster. Has anyone else made the switch and felt like it changed how they approach layout decisions?
2 comments
Log in to join the discussion
Log In2 Comments
lunah121h ago
Did the utility-first approach actually change how you think about spacing and sizing, or did you just get used to writing the classes? I'm curious because when I tried Tailwind I ended up leaning way too hard on arbitrary values instead of their default scale, which kind of defeated the purpose. Do you find yourself reaching for custom CSS less often now that you know the framework better, or are there certain things you still drop down to regular stylesheets for?
3
the_hayden57m ago
The first week I tried Tailwind I was doing the same thing with arbitrary values honestly. But after forcing myself to use their scale for like 2 weeks straight it just clicked. Now I almost never reach for arbitrary values unless its some super specific padding situation or an odd breakpoint. I still drop down to plain CSS for complex animations and media queries that dont fit their pattern though. Its gotten to where I actually think in terms of p-4 and mx-auto instead of pixels or rems in my head which is wild to me.
8