fix(web): add --destructive-text token for legible dark-mode destructive text #463
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-464-destructive-text-token"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds a
--destructive-textsemantic token (mapped to thetext-destructive-textutility) and rewires every destructive FOREGROUND text/label site to it.bg-destructive/text-destructive-foreground/border-destructiveare untouched.Why
.dark --destructive(0 62% 45%) is legible as a background under white, but as foreground text it is ~2.5:1 (AA fail) for error boxes, validation, alert banners, and delete/revoke button labels. Lightening the shared token would break white-on-redbg-destructive, so a separate--destructive-text(dark: 0 75% 65%, red-400 range) fixes text without touching backgrounds. UI audit (BUNYIP-455) finding F20 (the chosen two-token approach).Scope
input.css:
--destructive-textin all 4 theme blocks + the@theme inlinemapping. ~29 foreground-text sites ->text-destructive-text(error boxes, inline validation, auth banners, delete/clear-2FA/revoke/remove-photo buttons and theirhover:companions). Decorative destructive icons left as-is (graphical 3:1, not text).Verify
just check-containerpasses. Tailwind generatestext-destructive-textfrom the new@themeentry at the CSS build (image build runsbun run build:css).Closes BUNYIP-464.