The audit
On Thursday, October 15, we audited our design system as it actually shipped: the brand CSS and design docs, the site and portal styles, the live site, and the Aria and Kremio pages that Infinary Controls draws inside (Frappe's built-in web interface, where people use ERPNext in a browser.). Fifteen findings. The ones that mattered were measured, not matters of taste:
Nikolas approved the proposal the same day. The brand itself didn’t change.
The site and the portal
- Contrast-safe pairs. Primary fills moved to
#0062CC, with white on it at 5.80:1. Small blue text moved to#3D96FF(5.87:1), copper and danger buttons carry dark labels (4.64:1 and 5.21:1), and small copper text moved to#C9874A(5.36:1). - One button style: Fira Code 700, uppercase, .1em tracking, at 12, 13 or 15px.
- An 11px floor. About 1,070 text sizes under 11px became 11px.
- Copper means money, so form errors moved to the danger red.
- A shared
tokens.cssholds the semantic layer (ground, surfaces, ink, accent fills, state tints) for Carbon and a new light theme, Steel. It’s plain CSS so other repositories can vendor it.
Show data
| before | after | |
|---|---|---|
| White on primary blue | 3.98 | 5.8 |
| Small blue text | 4.42 | 5.87 |
| Copper button label | 3.79 | 4.64 |
| Danger button label | 3.38 | 5.21 |
A codemod that only changed class tokens did most of the edits. We checked the builds and scanned six pages at 1280px and 375px for overflow and for text under 11px. We didn’t visually check the signed-in portal pages; only the login page was looked at.
Frappe Desk: never on :root
Infinary Controls vendors the file with a script that changes only the selectors. :root becomes .infinary-ds, [data-theme="dark"] becomes [data-theme="dark"] .infinary-ds, and each of our surfaces puts .infinary-ds on its root element. A test pins the vendored file to a byte-for-byte copy of the source and checks that nothing Desk loads is declared on :root, and a --check mode compares it with the website repository’s main branch. On a bench, Desk’s own --radius was still 8px.
Desk had its own surprises. It styles code dark purple, unreadable on Carbon, and its .btn is rounded, so our controls set border-radius: 0 explicitly. Our pages follow Frappe’s data-theme on <html>: Steel when Desk is light, Carbon when it’s dark.
Infinary Controls 0.11.0 went live on our own site that evening. We checked it in a signed-in browser: Fira Code loaded, square solid buttons, 11px labels, Desk’s own radius untouched. We haven’t yet seen Steel on our own site, because the desk we checked is set to dark.
Fixing one pill exposed four more
Measured over every surface, the AI pill read 3.80:1 on Carbon’s raised surface. Its ink moved to a lighter violet, #C383FF, at 4.64:1. The same measurement then found four more pills under 4.5:1, for danger, money, live and warn. We moved each one’s ink by the least that clears 4.6:1 over every surface and left the tints alone. An end-to-end check now measures all five pills over four surfaces in both themes.
The same change fixed a bug on the live site. --grid-dot sat in a plain :root, and the site’s terminal mode overrides it inside @layer base. Declarations outside any layer beat layered ones whatever their specificity, so terminal mode’s cyan grid had never shown. The brand values now live in @layer theme.
The Kremio app
The app had copied Frappe’s look: greys, rounded corners, the system font. On October 16 it moved to v2.
- Tokens are generated from the shared file, by a script with a
--checkmode, and pinned by a test, not copied. - Inter and Fira Code are built into the app with Expo’s font config plugin rather than loaded at launch, so a cold start doesn’t wait for them. Files are named by PostScript name, because Android finds a font by file name and iOS by PostScript name. Styles set
fontFamilyand neverfontWeight, because on Android a weight on a single-weight custom font fakes a bolder one. - Tests hold the rules. One fails on any
borderRadius, anyfontWeightor any size under 11. Another measures every text token on every surface in both themes, and every pill on its tint; nothing is under 4.5:1. - One exception, Nikolas’s call: controls Android draws itself, such as switches, date pickers and dialogs, keep their own shape in v2 colours. Squaring them off would cost accessibility and familiarity for little gain.
On the emulator, the switch on Check fields had no colours set, and its off track was nearly invisible on Carbon. Both tracks now have colours, checked at 3:1. The new look reached the app’s 0.4.0 Android test build that evening.