Repository navigation
🐛 fix(theme): one two-tone focus ring, 3:1 on every background (#135) - #147
Merged
Merged
Conversation
…n every background (#135) --focus-ring-inner (black / white) is the second band of the two-tone focus ring and of the grid's focused cell; --accent-control the accent-color of native checkboxes. tokens.test.ts checks both per background and theme. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… background (#135) The focus-ring / focus-ring-inset utilities (src/index.css) draw a 2 px --accent outline plus a --focus-ring-inner band, outside the control or inside it (rows, tabs, toolbar and menu items, fields in clipping parents). Every focus-visible / focus-within outline moves to them; the selected segment drops its white ring, the colour swatches ring the whole swatch, the row detail's value field and the menus' highlighted items get the ring, the resize edges too (their accent tint was under 3:1). Native checkboxes take --accent-control. focusRing.test.ts refuses a single-tone focus outline, ring or border and an outline-none without the shared ring (ALLOWED lists the reasons). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… fill (#135) Glide strokes the active cell in --cell-focus, under 3:1 on --sel, the change fills and the selected rows. DataGrid's drawCell (now in read-only grids too) adds a 1 px --focus-ring-inner band just inside it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…uctural guard (#135) Dialogs, prompts, the import dialogs, panel buttons, breadcrumb and FK links, Structure tabs, the tab list filter and the workspace notices fell back to the browser's ring. focus_ring_everywhere scans each <button>, <input>, <select>, <textarea>, <a href> and tab stop (and MenuButton call sites) and resolves its className through literals, constants and imported constants; exceptions go to UNRINGED_ALLOWED with their reason. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s; notes on clipping and :has() (#135) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ition (#135) The structural guard kept one value per name (the last const, the first style key), so a duplicate could hide an unringed class. It now keeps every definition and passes only when each one draws the ring; notes on what it leaves out (ternary branches, dotted components, contentEditable, summary). 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 #135
Summary
The app now has one focus ring, in two tones, chosen by the owner. It reaches at least 3:1 against every background a focusable sits on, in LIGHT, DARK_MEDIA and DARK_FORCED.
--accentoutline and a 1 px band in a new token,--focus-ring-inner: black in light, white in dark. Two utilities insrc/index.cssdraw it:focus-ringsits outside the control: the outline at offset 1 px, the band as a box-shadow in the gap.focus-ring-insetsits inside: the outline at −2 px, the band as an inset box-shadow. It is used for rows, tabs, toolbar and menu items, and fields inside clipping or scrolling parents.aria-invalid:outline-dangerstill wins.--sel, the change fills and selected rows. It now gets the same inner band, drawn indrawCell1 px inside Glide's ring. The geometry was checked against the Glide 6.0.3 source, and unfocused cells pay nothing extra.--accent-controltoken (#0062CC in light, #4A88FA in dark) replacesaccent-accent. It reaches at least 3.30 on dark--pill.src/styles/focusRing.test.ts:outline-nonewithout the shared ring (8 entries inALLOWED, each with its reason). Noaccent-accent.focus_ring_everywherescans every.tsxfile for buttons, inputs, selects, textareas, links,tabIndex≥ 0 elements andMenuButtoncall sites. It follows class strings through constants, functions, style objects and imports. When a name has several definitions, every one must draw the ring.src/CLAUDE.md.The swatch label uses
has-[:focus-visible], which needs WebKitGTK 2.42 or later, as TabBar already does. No Rust change.How it was tested
I didn't run the app, so the owner needs to make one keyboard pass, in light and then in dark.
Manual check list (light, then dark, at 100 %)
Do each step in the light theme, then the dark theme (Settings, or
data-theme), at 100 % zoom.--content.--seg-sel) and a hovered one.--tab) and the active tab (dark--tab-sel: the white band should stand out);--side, and on an applied row's--filter-applied), fields, buttons, SQL preview.--sel).--sel), fields (ring inside, over the border), buttons.In each case, check:
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