I used to think CSS was polite. Declarative. Predictable. I would write a rule, refresh the browser, and expect the page to bow respectfully. Instead, it would shrug and do something else. A margin would vanish. A color would refuse to change. A layout would collapse like a tavern table after one too many tankards. What I eventually learned is that CSS is not polite. It is lawful. The cascade is not chaos. It is a rule system. A hierarchy. A quiet tribunal that decides which declaration lives and which one fades into obscurity. Once I stopped fighting it and started studying it like a wizard studies a spellbook, everything…
-
-
Understanding the rules before bending them. CSS is often treated as unpredictable. Styles override each other. Layout shifts unexpectedly. Developers respond by increasing specificity, rearranging rules, or layering fixes on top of fixes. The problem is rarely CSS itself. The problem is mental models. The CSS Codex is a structured 4 week, 12 part series designed to build a clear, scalable understanding of how CSS actually works. Each article builds on the previous one. Every concept connects forward and backward. By the end, the Codex forms a cohesive system rather than a collection of isolated tips. This is not about tricks.It is about rules.It is about discipline.It is about building…
-
The first time I truly understood the DOM, it felt less like learning a new API and more like discovering the rulebook behind the dungeon screen. For years I treated the browser like a mysterious Dungeon Master who simply made things appear. Click a button, something happens. Submit a form, data vanishes into the ether. Change a class, styles rearrange themselves like obedient goblins. It felt magical. It is not magical. The DOM is structure. It is state. It is a living tree of nodes that the browser maintains with ruthless logic. When I stopped treating it like a spell system and started treating it like a rules engine, everything…
-
There was a time when I treated layout like it started at display: flex;. If something wasn’t aligned, spaced, or distributed exactly the way I imagined, I didn’t pause to understand what the browser was already doing. I just reached for Flexbox. It felt like leveling up. Normal document flow, on the other hand, felt like the starter dungeon. Functional. Necessary. But not where the “real” mechanics lived. That assumption was wrong. Because CSS flow isn’t the tutorial. It’s the physics engine. Flexbox is a powerful positioning spell layered on top of it. And if you don’t understand the world’s physics, you end up burning high-level slots to solve low-level…
-
CSS has a reputation problem – and for a long time, I bought into it. Early on, I treated CSS as “just styling.” Something you learn first, use constantly, and rarely revisit with much intention. JavaScript felt like the real work. Frameworks felt like progress. CSS was just… there. Until something broke, at which point it somehow became the problem. Over time, I realized that view was backwards. Modern CSS isn’t a grab bag of tricks. It’s a system. Layered. Predictable. Governed by rules that actually make sense once you stop fighting them and start reading them the way they were designed to be read. If HTML gives structure and…











