Repository navigation
🐛 fix(theme): accent and danger text read 4.5:1 everywhere (--accent-text, --danger-text) (#129) - #137
Merged
Conversation
…kground they sit on --accent as text reads 4.02:1 (light) / 4.24:1 (dark); --danger falls under 4.5:1 on --seg-sel, --sel and dark --btn / --pill. New text tokens, same hues: --accent-text #0057B5 / #92B6FA, --danger-text #AD2323 / #FF9999, tested on every background their uses sit on in light, dark media and dark forced (#129). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ic guard Every text-accent / text-danger becomes text-accent-text / text-danger-text (links, error messages, destructive labels, icons drawn through text-*). textColor.test.ts refuses --accent or --danger as a text colour in src/ (classes with any variant, important, opacity or arbitrary-value form, inline styles, CSS) (#129). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ext where they read linkColor reads --accent-text; a deleted row's indicator follows its text. A failed row's text is --danger-text on plain rows; on an inserted or deleted row the fill keeps its text, and an edited cell of a failed row keeps --modified with the text that reads on it (#129). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…-text Spec §5.1 amendment (#129) with the token values and the ratios per background; src/CLAUDE.md colour rule and the fill guard's comment point to the text tokens. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… red Tailwind 4 orders .text-text and .text-icon after .text-danger-text, so query Cancel, SSL Browse (failed pick), the connection delete button and the safe mode button (failed save) never showed red. Their shared styles get a colourless base (btnBase, buttonBaseClass, iconButtonBaseClass, iconButtonBase) and each button one colour. textColor.test.ts refuses a class string with two base text colours, through constants and imports (#129). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…an edited cell Every failed row keeps a red cue: its row number in --danger-text on --grid-head (6.33:1 light / 7.59:1 dark), white when selected. An edited cell's FK indicator takes the text that reads best on --modified (the dark --accent-text was 2.51:1 there) (#129). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #129
Summary
--accentand--dangerused as text read below 4.5:1 on several backgrounds: accent at 4.02 light / 4.24 dark, danger down to 3.40. Two new text tokens fix this. Both keep the base hue and reach ≥ 4.5:1 on every background they sit on, in LIGHT, DARK_MEDIA and DARK_FORCED:--sel)--accent-text--danger-texttext-dangerand 3text-accentuses across 28 files.--accentand--dangerstay for tints, rings, borders and outlines.--accent-text;--modified(white in dark, 5.11:1).--danger-text;--grid-head; a selected row's number stays white).text-text/text-iconandtext-danger*in one class string, and the neutral colour won. The affected controls were query Cancel, SSL Browse, connection delete and the safe-mode button. They now use colourless base classes plus exactly one colour.src/styles/textColor.test.ts):--accent/--dangertext colour remains, in class, inline or CSS form;text_colour_conflict_guard: no class string combines two basetext-<colour>utilities. Before the fix it flagged exactly the four controls.tokens.test.tschecks every text token on every background it sits on.src/CLAUDE.md(text tokens, one base text colour per class string).Follow-ups filed from the review: #135 (focus rings and accent controls under 3:1) and #136 (text on the grid's change fills under 4.5:1).
No Rust change.
How it was tested
Manual check list (light, then dark: OS dark and Settings > forced dark)
aria-invalidred borders on fields, focus rings, and checkboxes.Checklist
pnpm testgreenpnpm lintgreen (tsc; no Rust change, clippy in CI)pnpm test:rustgreen (not applicable: nosrc-tauri/change)src/lib/strings.ts<emoji> <type>(<scope>): <description>🤖 Generated with Claude Code