mirror of
https://github.com/bitbaum/kits.git
synced 2026-12-06 03:07:27 +01:00
0bdf708ae9d848ed63e9fbc331d49356fee4cdb3
* feat(tokens): pair the accent with a label that can be read on it White on --public-accent (#ff5c00) is 3.10:1 — below the 4.5 AA floor for normal text. Because the accent is the fleet's single action colour, that one pairing put three primary CTAs under the floor simultaneously: Solon's "Open the Dashboard", OrangeCat's "Get Started", FleetCrown's "Launch agent". Measured on the live sites, not guessed. Nobody noticed for months because an orange button with a white label looks completely normal. It is only wrong when you measure it. Adds --on-accent (near-black, 6.10:1 on the accent) and maps it as `text-on-accent`, so the ink is paired with the background it belongs to and nobody has to remember which label an orange button takes. The orange is deliberately NOT darkened to rescue white text. It would have to reach roughly #c74600 to clear the floor, which is a duller, muddier colour — and the accent IS the brand. The label gives way, not the brand. Theme-independent for the same reason --public-accent is: the accent does not flip between themes, so a label that flipped with it would be unreadable in one of them. That is precisely why no existing text token could be reused here — --text-primary inverts, and this must not. test/contrast.test.js pins the arithmetic, including the negative side: if someone brightens --on-accent to "soften" the buttons the build fails here, and if the accent is ever darkened enough that white becomes legitimate again, that test fails too so the pairing is revisited deliberately instead of left as a token nobody can explain. Verified the gate is not vacuous — flipping --on-accent to white fails it at 3.10:1. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(test): annotate the contrast helpers — this package typechecks its JS tsconfig runs with checkJs and noImplicitAny, so a plain .js test file fails typecheck even though it runs. The existing contract test already carries JSDoc for the same reason; the new one now matches it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Description
The bitbaum packages, in one repository (17 packages, full history).
10 MiB
0 Stars
2 Watchers
0 Forks
Languages
TypeScript
52.1%
JavaScript
40%
CSS
7.4%
HTML
0.3%
Shell
0.2%