Thaddius Gamueda
Part 3 — Process of BuildingDesign System

Tailwind CSS v4: One File That Decides Everything

How This Site Was Built — Part 3 of 4

Part 2 left off with a promise and a warning: the entire look of this site flows from a single source of truth, and getting one value format wrong silently breaks everything. This part is that source of truth up close. It is also the part where challenging the AI stopped being about taste and became about forensics, because the hardest output to push back on is the kind that fails without telling you it failed.

Tailwind CSS v4 is the layer that turns the design system from Part 1 into actual pixels. Understanding what it does is worth a minute before we get to where it fought me.

What Is Tailwind v4 Actually Doing Here?

To begin, Tailwind is the styling engine, and version 4 changed how it is configured in a way that matters for this story. Older Tailwind kept its settings in a JavaScript config file. Version 4 moves color, type, and spacing into a CSS-based theme block instead, a single place where the design tokens live. Every section, every card, every label reads from that one block. The hero font size, the Paper background, the navy accent: none of them are typed into individual components. They are declared once and consumed everywhere.

That is the entire promise of the architecture. Change the token, change the site. It also means the token file is the one place where a single mistake is not local. It is global, and that is exactly what bit me.

How Does a Site Break Without a Single Error?

Here is the war story I have been saving. I set the background color the obvious way, as a hex code, #FAFAF7, the Paper white the whole design depends on. Nothing happened. The background stayed wrong, and there was no error, no warning, no red text anywhere. The site simply ignored me.

The cause is a quiet incompatibility. The shadcn tokens Tailwind was reading do not want hex values. They want HSL components, written as 60 23% 97% with no function wrapper. When you hand that system a hex code, it silently builds an invalid color and discards it. No crash, just a value that evaporates.

This is the moment that defines the series. The easy move is to accept the silence, try a different shade, nudge a class, and move on when something finally looks close. I refused that. A workaround that makes the symptom disappear without explaining the cause is not a fix, it is a delay. So I made Claude and myself stay on it until we could name exactly why a valid-looking color was being thrown away. It cost a full step of the build. It also meant every color after that one went in correctly the first time, because we finally understood the rule instead of guessing around it.

Why Reject the Easy Local Fix?

The silent-failure fight taught the discipline that governed the rest of the styling: fix the token, never the instance. When one component looked off, the tempting repair, and often the AI's first instinct, was to paste a color or a size directly onto that one element. That always works in the moment. It also quietly kills the system, because now there are two sources of truth, and the next global change skips the element you hardcoded.

I pushed back on every one of those one-off patches. If a card was wrong, the question was never how do I make this card look right. It was which token is wrong, because the answer had to hold for every card at once. A design system dies one reasonable exception at a time, and the only defense is refusing the exception even when it would be faster.

How Do You Hold a Four-Color Ceiling?

Tailwind makes it effortless to add color, which is precisely the danger. Every shade in the rainbow is one class name away, so an AI building components will reach for a blue here, a gray there, a soft green for a success state, and none of it looks alarming in isolation. The four-color ceiling from Part 1 does not enforce itself. I had to police the output and catch every unauthorized color that crept in, then route it back to the four tokens the system actually allows: Paper, ink, slate, and the single navy accent. Restraint at the design stage is a decision. Restraint at the styling stage is enforcement, and the tool will erode it for you if you let it.

What Does This Part Prove?

A single source of truth is only as strong as your willingness to defend it. The architecture gave me power, one file that decides how everything looks, but power with no scrutiny just lets you break everything in one place instead of many. The real work was forensic: refusing a silent failure, refusing a local shortcut, refusing a fifth color. Each refusal kept the system honest, and a system that stays honest is what lets one person ship something that looks like a firm built it.

In Part 4, the system leaves my machine. Cloudflare Pages and GitHub turn every commit into a live deploy, and the final test of all this discipline becomes simple: does it survive contact with the open internet, and what do you do when a build that worked locally refuses to ship?