I run a site with around 270 pages. Most of them are calculators — time cards, overtime by state, paycheck estimates — and every one of them shares the same look. When I started, that sounded like a maintenance nightmare: one colour change would mean editing hundreds of files. In practice it has been the opposite, because the whole theme lives in one place — a handful of CSS custom properties.

One file holds the theme

Every page on the site links the same stylesheet. At the top of that stylesheet there is a :root block with the colours the whole site is built on:

:root { --green: #0b6e4f; --green-dark: #084d38; --green-light: #e6f4ec; --ink: #1a2b23; --muted: #5c6f66; --line: #d9e6dd; --card: #ffffff; --radius: 10px; } 

Nothing else in the stylesheet uses a raw colour. Buttons, headings, borders, result boxes, table headers — they all read from these variables. A primary button is background: var(--green). A card is border: 1px solid var(--line). The moment I decided the green was a touch too bright, I changed one line in one file and all 270 pages changed with it.

Why this mattered at scale

When the site was five pages, hard-coded colours would have been fine. At 270, they would have been a slow disaster. The state overtime pages alone are 51 near-identical layouts. If each one carried its own hex values, a rebrand would mean a search-and-replace across the whole folder and a prayer that I caught every instance. With variables, a rebrand is one edit and a refresh.

It also stopped drift. On a site this size, drift is the real enemy. One page gets a slightly different button colour because someone copied an old snippet; a result box on another page has a different border radius. Because every component reads the same tokens, the pages stay consistent without me thinking about it.

Variables do more than colours

Colour is the obvious win, but spacing and shape tokens carry just as much weight. --radius keeps every card, input and button at the same corner curve. A --gap value keeps the rhythm of the page steady — the space between a label and its input is the same on the time card page as it is on the salary converter. When I widened the gap slightly after testing on a real phone, every page got the fix at once.

The trick that surprised me most is scoping. A variable can be redefined inside a component without touching the rest of the page:

.result-box { --green: #0a5c42; background: var(--green-light); border-left: 4px solid var(--green); } 

Inside .result-box, --green means the darker shade, and everywhere else it means the normal one. That let me give the pay result a stronger accent without adding a new token or a new class name.

What I would do differently

I would have named the tokens by their job, not their colour, from day one. --green is fine until the day the brand colour is not green any more, and then every name in the file lies. --accent and --accent-dark would have survived a rebrand without a rename.

I would also have kept the token list shorter. It grew to about twenty variables, and a few of them are used on one page each. A token used once is not a theme token; it is just a variable with extra steps. The ones that earn their keep are the colours, the radius, the spacing scale and the two text colours. Everything else I now write inline.

The lesson is a boring one, and that is why I like it: on a site with hundreds of pages, the theme is not a design choice, it is an architecture choice. One file, a short list of variables, and a rule that nothing else is allowed a raw colour. It is the reason I can still change the look of the whole site in an afternoon.

You can see the result in the wild on mytimecardcal.com — every calculator there, from the time card to the state overtime pages, runs on that one shared theme.