← Back to Admin Tools
13
Commits
28
Files touched
+556 / −375
Lines changed
0
Inline styles in HTML
0
Hardcoded colors outside palette*
11/11
JS files parse clean

Figures above are a snapshot of the original June 14, 2026 pass. A later July QA cycle (see RELEASE-NOTES.md) closed the remaining gaps this page originally flagged as follow-up work: the last hardcoded-color literals were tokenized (adding --warning and --on-accent to theme.css), and admin-tools.html/audit.html's inline <style> blocks were extracted to their own CSS files. *"Outside palette" excludes the Birthdays & Anniversaries print-popup window in reports.js, which writes its own standalone HTML document with no access to theme.css and is intentionally inline.

The problem before

The site worked, but it had accumulated drift typical of patch-built projects. The issues weren't visible to family members loading the page, but every future change cost more time because the same inconsistencies kept resurfacing.

Multiple sources of truth for the palette

theme.css was the canonical source for colors, but dashboard.css and login.css each redeclared every color token in their own :root blocks — and won the cascade because they loaded later. Any change to theme.css would silently fail to propagate to those pages.

Dark-mode regressions

Several hardcoded colors looked fine in light mode and broke in dark mode:

Defensive fallbacks that lied

Patterns like var(--text-muted, #666) were scattered across six files. The fallback values were always light-mode colors, so if the var lookup ever failed in dark mode you'd get a light-mode color rendered against a dark background.

Token naming inconsistency

--bg-card vs --card-bg, --accent vs --primary, --bg-card vs --surface — all aliases of the same thing, picked inconsistently per file.

Layout drift

.page-body padding varied across pages (24px, 24px 32px 80px 32px, 32px 24px, 24px 24px 48px) — content shifted as you navigated between tabs.

Duplicated JS

Helper functions were defined multiple times with subtle differences:

Inline-style sprawl

16 inline style="" attributes across HTML files plus 29 more inside JS template literals. Every one a future dark-mode landmine, since inline styles bypass the design tokens.

What's true now

Single source of truth, everywhere

Dark mode is correct everywhere

Inline styles are gone from HTML

Layout consistency

Accessibility

What didn't change

The practical payoff

Why this matters going forward
Next time you want to change (e.g.) the accent blue, you edit one variable in theme.css and every page across the site flips. Next time you add a new page, the load order and palette inheritance are obvious. Next time a helper function needs a fix, you fix it once in api.js instead of hunting through four files for slightly-different copies.

The site looks the same to a family member loading it — but the codebase is now consistent enough that future iteration won't keep re-discovering the same pile of inconsistencies.

Commit log