-
The CSS Codex, Part II: Escaping the Specificity Dungeon
When I first began to understand the cascade, I felt like I had discovered the laws of the realm. In Part I of The CSS Codex, I explored how order, origin, and importance determine which rule prevails. Yet even after learning those laws, I found myself trapped in a darker chamber of the style sheet. Specificity. Specificity is the dungeon beneath the castle. It is where good intentions go to duel each other. It is where a humble utility class is crushed beneath a towering chain of selectors. It is where developers whisper the forbidden incantation of important and hope no one notices. I have been there. I have written…
-
The CSS Codex: Mastering the Rules of the Realm
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 Rogue Who Could Not Tab: Fixing Keyboard Navigation
I have shipped features that looked beautiful and worked perfectly with a mouse, only to discover later that they were nearly impossible to use with a keyboard. It felt like building a grand stone keep with polished banners and glowing torches, then realizing I forgot to add doors. Users could admire it from afar, but they could not enter. Fixing keyboard navigation after the fact is humbling. It forces me to examine every assumption I made about interaction. It also reminds me that accessibility is not an optional side quest. It is part of the main campaign. When I return to an existing codebase to repair keyboard support, I approach…
-
The DOM Without Magic: Rolling for Initiative in the Browser
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…
-
One More Potion in the Pack: The Performance Cost of One Extra Image
There is a moment in every campaign when someone insists it is only one more item. One more rope. One more potion. One more mysterious glowing artifact that absolutely will not awaken something ancient. Then the party slows down. Movement decreases. Initiative suffers. The dragon closes the distance. I used to treat images that way in my projects. It is only one more image. It will enhance the design. It will elevate the aesthetic. What could it possibly cost. More than I expected. I learned this while refining one of my portfolio builds. The layout was clean. The typography was intentional. The JavaScript was efficient. Performance metrics were solid. Then…