frontend

Teaching the Next Dev: Why Explaining Your CSS Matters

Thoughts from the intersection of code, craft, people, and progress.

Good documentation starts with good naming and structure.

CSS has a habit of looking obvious to the person who wrote it and faintly supernatural to everybody else. Clear naming, sensible structure and the occasional useful comment make it much easier for the next developer to understand the intent rather than merely preserve the mystery.

CSS rewards people who understand its model more than people who accumulate workarounds. The cascade, intrinsic sizing and modern layout tools solve a surprising number of problems once we stop fighting them.

I have learned to be suspicious of advice that only works in a tidy example. Real projects come with history, deadlines, uneven confidence and requirements that move while you are looking at them.

Front-end work has a habit of looking simple from a distance. The browser then introduces real content, small screens, old devices, keyboard navigation and somebody using the product in a way nobody drew in the design file.

I do not always manage it perfectly. The aim is to make the better choice easier to recognise the next time it appears.