Moving away from Tailwind, and learning to structure my CSS

30 points by dzwdz


dkasper

not sure if this opinion will be popular, but I don't typically use any css or javascript frameworks for my personal projects anymore. Can't have supply chain vulnerabilities if you have no dependencies! Of course that's only one type of vulnerability but it helps.

wrs

I mean, yeah — this is how CSS works. People not knowing this and blindly using Tailwind make me want to step outside and yell at clouds for a while. AFACT, 90% of Tailwind is just inline styles with different syntax — it's arguably just one step above <FONT> tags.

dzwdz

As someone who hasn't really been following along, this seems like a pretty good peek into modern CSS practices. I really like all the links to her inspirations, they seem like good reading (but so far I've only read "no outer margin").

I am, however, a bit skeptical of the "bottom up" approach for base styles? Not that I know what else I would do (and it still seems worth a shot), base styles are just inherently finnicky.

cespare

I love this article. I also learned about CSS gradually over time by writing lots of random little sites, and I think that I would have benefited from thinking about these sorts of "systems" more from the beginning. I'm fairly allergic to frameworks but not using them meant that I often felt like I was floating in a bit of a structureless void even when I understood how to make everything work like I wanted.

yawaramin

I found this structuring technique very useful for organizing CSS: https://rstacruz.github.io/rscss/

It broadly agrees with and provides a bit more structure and organization on top of what jvns describes in OP.