Web Development

CSS Cascade Layers Vs. BEM Vs. Utility Classes: Specificity Control

CSS is wild, really wild. And tricky. But let’s talk specifically about specificity. When writing CSS, it’s close to impossible that you haven’t faced the frustration of styles not applying as expected — that’s specificity. You applied a style, it worked, and later, you try to override it with a different style and… nothing, it […]

CSS Cascade Layers Vs. BEM Vs. Utility Classes: Specificity Control Read More »

A Better API for the Resize Observer

Resize Observer, Mutation Observer, and Intersection Observers are all good APIs that are more performant than their older counterparts: ResizeObserver is better than the resize event MutationObserver replaces the now deprecated Mutation Events IntersectionObserver lets you do certain scroll interactions with less performance overhead. The API for these three observers are quite similar (but they

A Better API for the Resize Observer Read More »

Breaking Boundaries: Building a Tangram Puzzle With (S)CSS

For years, I believed that drag-and-drop games — especially those involving rotation, spatial logic, and puzzle solving — were the exclusive domain of JavaScript. Until one day, I asked AI: “Is it possible to build a fully interactive Tangram puzzle game using only CSS?” The answer: “No — not really. You’ll need JavaScript.” That was all

Breaking Boundaries: Building a Tangram Puzzle With (S)CSS Read More »