Repository navigation
fix: improve monochrome selection contrast - #123
Conversation
Ensure active and inactive Monaco and xterm selections meet WCAG AA contrast in the monochrome themes, with runtime regression checks for both surfaces.
Monaco preserves token foregrounds inside selected text, so apply explicit monochrome selected-text colors and validate a real editor selection in the smoke hook.
Implementation correction@kbuffardi reported:
Root cause: Monaco applied the configured selection background but retained the token foreground inside selected text. The previous smoke hook created a synthetic span, so it did not prove the actual Monaco selection rendering. The PR now:
Verification passed: lint, production build, and 234 E2E tests. |
Use grayscale selection overlays that contrast with Monaco's unchanged source text, and inspect the real overlay and source span in the smoke hook.
Monaco overlay correction@kbuffardi reported:
The active-state screenshots showed that Monaco draws selection backgrounds in an overlay separate from source-code text spans. The previous selected-text CSS targeted the overlay and could not change the glyph color. The PR now removes that ineffective override and uses WCAG AA grayscale overlay backgrounds that contrast with Monaco's actual code foreground:
The smoke hook now reads the real selection overlay background and the rendered source span color independently. Lint, production build, and 234 E2E tests passed. |
Summary
monochrome-lightandmonochrome-dark.Verification
npm run lintnpm run buildnpm run test:e2e— 232 passingnode scripts/smoke-browser.mjs chrome— unable to complete in this environment; the harness hung during browser startup/runtime verification and was stopped.The five existing non-monochrome themes were not changed.
Closes #121