You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A11y: red selection — bg, hairline, cursor outline
Iterates the selection visual to address tester feedback that the previous gold and the early deep-red were both hard to tell apart from regular rows. Lands as one cohesive design pass:
- **Three-tier selection-fg**: `--color-selection-fg-primary` (strong, applied on the selection bg), `--color-selection-fg-cursor` (slightly tamed for cursor-on-selected), `--color-selection-fg-fallback` (text-primary for the dark + tinted + cursor-active corner). Light primary `#cc0000`, cursor `#b80808`. Dark primary `#ff4040`, cursor `#ff8c8c`. The cursor tier swaps in via `.is-selected.is-under-cursor`; the existing fallback rule still wins for the tinted-dark + cursor-active corner via higher specificity.
- **Selection bg in both modes**: `#f2f2f2` light, `#141414` dark. Light reads as one shade darker than white (distinct from the warm cursor highlight by hue, distinct from the stripe by luminance); dark reads as a noticeably darker block than the pane.
- **Hairline between consecutive selected rows**: `inset` `box-shadow` so row height is unchanged. Fixed faint gray — `rgba(0,0,0,0.03)` light, `rgba(255,255,255,0.025)` dark. Suppressed on the cursor row's top (cursor's own outline carries the signal there).
- **Cursor outline**: faint accent-colored 1px `inset` box-shadow on every cursor row (focused and unfocused). New token `--color-cursor-outline` at 35% accent alpha. Restores cursor distinguishability against the gray selection bg.
- **Zebra stripes** auto-disabled on selected rows (selection-bg wins over stripe by cascade order).
Synthesizer + docs updated:
- `row_state_matrix.go` models the three-tier cascade via `selectionFgTokenFor()` + `withSelectionFgVariant()`, replacing the old binary-fallback predicate. Resolves `--color-selection-bg` for the non-cursor row variants so primary red is evaluated against the real selected-row bg.
- `dropdown_states.go` `ancestorBgScenario` gains an `FgExpr` field for scenarios whose fg is an inline CSS expression rather than a single var. Tightened to the post-fix dropdown rule.
- README: full Architecture section listing every file, a "Row state matrix" + "Dropdown ancestor-bg matrix" subsection, the parser-normalization note (strip `@supports not`, descend every `@media (prefers-color-scheme: dark)`), and an "Add a new scenario" recipe under Extending.
All 1070 contrast pairs clear AA. Full check suite green (50 checks, 4008 tests).
0 commit comments