It was fun to read Julia Evans’ journey to just writing CSS again, from originally using Tailwind. It’s a very personal journey with personal reasons, and I like the realness of that. Like Julia never really used a build system, which is, dare I say, kind of the point of Tailwind. Without it, instead of getting highly efficient CSS output, you get highly inefficient CSS output. (Tailwind on CodePen, by the way, does it the efficient way ;)).
I decided years ago that I wanted to react to “CSS is hard” by getting better at CSS and taking it seriously as a technology, instead of devaluing it.
Julia dug in! And modern CSS rules, sentiments we’ve heard echoed from Jason Santa Maria and Dave Shea recently.
Never underestimate someone who’s been bitten by something one too many times. Andrey Yamanov seems like he’s had a state-based CSS selector not work properly one too many times such that he’s built a whole ass CSS-in-JS library that is designed to avoid that one problem. Not for me, but I like it when people scratch their own itch with a flamethrower sometimes.
With similar spirit, Craig Abbott argues that the long-standing practice of styling with primarily classes might not be a good idea. By using a class, you might be papering over the bad practice of putting that class on something that… doesn’t deserve it? I guess? I feel like in practice this is more trouble than it’s worth and you’d end up with a class anyway. But that’s what I mean on how it’s a similar spirit to Andrey’s idea. Some folks get a wild hair and it becomes their thing. Also: reminds me of gating styling to things that only have the proper aria- attributes and such, which I’m more on board with.
Here’s the GitHub blog post (Josh Black & Marie Lucca) where they talk about how CSS Modules was the right solution for their design team. This was the motivation we needed here at CodePen (long-time CSS Modules fans), to get CSS Modules out as a Block in the editor. So yeah, we’ve got that now, and I kinda love it.