Post

Great post! I’ve recently just updated my website and rearchitectures my CSS from the ground up because I was sick of fighting the cascade. I ended up settling on ITCSS as a base, with layers for elements, components, patterns and focus styles. It’s working well for me.

Nice. 🎃 the scary words are „being able to ignore 95% of the codebase when implementing a feature …“ These can cause so many code bases to bloat up. This works if your project is small and short term. It adds up over time. And changes on the design system level become harder. (1/2).

I did consider making this the central theme of the post but it probably warrants a second one. The difference is that we are scared of different things. You are scared of bloat, and duplicating code which makes it much more work to make changes to the design system.

I am scared of complexity. Having a code base where you need to hold too much information in your head just to make a simple style change. I am so scared of this, that I am more than happy to accept a code base that is much less DRY.

I don’t mind that it is more work to update a design system. I worry about people updating it by mistake. With scoped styles you are trading efficiency for simplicity. On smaller projects that is not that useful. On large projects it is essential.

I know there are rare. But in a typical lifecycle of a product they drop in every so often. Leading to discussions like: Designer: "What do you mean 6 weeks?! I just changed to variables in Figma? Why do you have to update 46 components?". Developer: "Oh sorry, I mean 78 Story points." (2/2)

You can still use css variables with scoped styles. Also, just update the 46 components. Before AI that was 2-3 hours of work. Now it’s 10-20 minutes. If your dev is giving you 6 weeks then your problem has nothing to do with css

CSS custom properties (aka. Variables) I would deem one of those code quality thingies. Turns out, they are important. And actually a way to break out of the scoped mindset. Which, thanks to the more vocal part of the CSS in JS crowd are rumored to be evil. Resulting in JS devs who don’t know CSS.