frontend

CSS Grid: At Last, Layout Makes Sense

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

How CSS Grid changed how I structure pages forever.

For years, web layout involved persuading floats and positioning rules to do jobs they were never hired for. CSS Grid finally gives us a layout system that describes rows and columns directly, which feels almost suspiciously reasonable.

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.

There is a practical tension underneath this topic: we want enough structure to move confidently, but not so much that the structure becomes the work.

Prefer the thing that survives contact

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.

That is why I favour choices that are easy to inspect. Start with semantic HTML, let CSS do the layout work it was designed for, and add JavaScript where it creates genuine value. Cleverness is occasionally useful; legibility is useful every day.

The best front-end code does not show off. It makes the interface feel obvious.

The web is wonderfully forgiving, but users should not have to rely on that forgiveness. Build from sturdy foundations and the interesting parts become much easier to enjoy.

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