Skip to content

[01112] CodeInput text selection invisible in dark mode#3444

Merged
dcrjodle merged 1 commit intomainfrom
plan-01112-Ivy-Framework
Apr 7, 2026
Merged

[01112] CodeInput text selection invisible in dark mode#3444
dcrjodle merged 1 commit intomainfrom
plan-01112-Ivy-Framework

Conversation

@dcrjodle
Copy link
Copy Markdown
Collaborator

@dcrjodle dcrjodle commented Apr 7, 2026

Summary

Changes

Fixed invisible text selection in CodeInput widget in dark mode. Replaced the broken ::selection CSS rule (which used var(--input) — a dark grey in dark mode) with CodeMirror's .cm-selectionBackground selector using var(--primary) at 25% opacity, visible on both light and dark backgrounds. Added drawSelection() extension to enable CodeMirror's own selection rendering layer.

API Changes

None.

Files Modified

  • src/frontend/src/widgets/inputs/code/theme.ts — Replaced ::selection rule with .cm-selectionBackground and fallback ::selection using var(--primary) at 25% opacity
  • src/frontend/src/widgets/inputs/code/CodeInputWidget.tsx — Added drawSelection import and included it in minimalSetup extensions

Commits

Replace broken ::selection CSS rule with CodeMirror's .cm-selectionBackground
selector using var(--primary) at 25% opacity. Add drawSelection() extension
to enable CodeMirror's selection rendering layer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dcrjodle dcrjodle merged commit de5ae31 into main Apr 7, 2026
13 checks passed
@artem-ivy-ai
Copy link
Copy Markdown
Collaborator

Staging removed

Staging environment has been deleted for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants