I watched Iron Fist and coded CSS 👈

They have nothing in common.

Well, aside from entertaining my weekend. I’m just bad at blog titles and I’m fed up of writing nonsense like “CSS modularity; theory and practice”. My draft title, which let’s face it, nobody is clicking.

Iron Fist is ‘aight I guess. I’m 7 episodes deep and I’m still awake which is an improvement over Luke Cage.

So anyway, CSS (and React) is the other thing I did this weekend.

I’ve been tinkering with my website again. I’d initially cut corners coding a static site generator. My homepage was one monolithic React component. Hard-coded content and all. Not an immediate problem, likely never to be one, but I wanted to do a proper job eventually. If only to sate my inner completionist.

Whilst abstracting the code I noticed minor flaws in my modular CSS thinking. I took the opportunity to refactor these too. All the benefits of this work were in effect theoretical. My website looks and functions the same. It’s not a big design. Basically two templates; one a wall of text. Why bother worrying about theory when I’ve already shipped it? Practice makes perfect?

Writing CSS and it’s associated markup at scale is hard. We subscribe to strict methodologies and call them ‘best practices’ in an effort to maintain order. We enforce rules beyond what the web standard specs require of us. That’s because from experience CSS maintainability all too quickly spirals out of control when we get lazy.

I suppose that’s why I’m so keen to do things the ‘right way’ before it matters. Small websites are not in my code editor long enough to bite back if I fail to adhere to a system. That doesn’t mean I shouldn’t.

I found this article interesting: “Why Japan’s Rail Workers Can’t Stop Pointing at Things”. Spoiler: the physical action reinforces their adherence to safety protocol. Simple and effective. Why aren’t we all pointing at things?

From now on when I’m satisfied with a class name I’ll give it the old finger gun. Or punctuate it with an iron fist.

Maybe.

That might be weird.

Buy me a coffee! Support me on Ko-fi