# Found that the light theme had been missing a full‑page overlay layer since the day it was written, by asserting that both themes paint every layered surface with the same number of layers.

2025

**Situation.** The site ships two colour themes. The dark one is the default and gets looked at constantly; the light one is an override that appears only under a system preference, which means it is seen far less often and by nobody who is checking it. Theme parity is a class of defect where a surface is built once and restated once, and the restatement quietly drops a layer.

**Task.** Parity needed an assertion, because the only alternative is a person remembering to switch preference and look.

**Action.** The check is small and structural: for every layered surface, count the layers each theme paints, and fail when the counts differ. It does not compare appearances — themes are supposed to look different — it compares composition, which is the thing that should be identical. It found the defect on its first run. The site's full‑page cover is three layers in the dark theme, a facet pattern over a scrim over the wall, and the light theme restated it with two. The facet overlay had been absent from the light theme from the day it was written, and nothing had ever said so, because a page missing one of three background layers looks like a design decision rather than a bug. The fix was one rule; the write‑up afterwards recorded what the overlay costs in contrast, so the addition is measured rather than assumed to be free.

**Result.** A layer missing from one theme now fails a commit, and one that had been missing since it was written is painted. This is the shape of defect the whole checking approach is aimed at — nothing was broken, nothing errored, the page rendered correctly, and it had been wrong for months.

---

- Role: Design Systems Engineer
- Categories: [Frontend Engineering](https://engineer.company/categories/frontend/), [Automation & CI/CD](https://engineer.company/categories/automation/), [Testing & QA](https://engineer.company/categories/testing/), [Design Systems & UI](https://engineer.company/categories/design-systems/), [UX / UI Design](https://engineer.company/categories/ux-ui/)
- Services: [Frontend Development](https://engineer.company/services/frontend-development/), [UI/UX Design & Design Systems](https://engineer.company/services/ui-ux-design/)

<https://engineer.company/portfolio/found-the-light-theme-missing-an-overlay-layer-134/>
