Skip to content

fix: use accent color for text selection highlight#74

Closed
tellaho wants to merge 1 commit intomainfrom
tho/fix-selection-highlight
Closed

fix: use accent color for text selection highlight#74
tellaho wants to merge 1 commit intomainfrom
tho/fix-selection-highlight

Conversation

@tellaho
Copy link
Copy Markdown
Collaborator

@tellaho tellaho commented Apr 2, 2026

Summary

  • Add a ::selection rule that uses the user's accent color (--color-brand) at 60% opacity for text selection background
  • Previously there was no custom selection style, making selected text nearly invisible in dark mode
image

Test plan

  • Select text in the chat input and verify the highlight is visible
  • Change accent color in Settings > Appearance and verify selection color updates accordingly

🤖 Generated with Claude Code

Previously there was no custom selection style, making text selection
hard to see in the dark theme. Now uses the user's accent color at 60%
opacity so selections are visible and theme-aware.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tellaho tellaho requested a review from wesbillman as a code owner April 2, 2026 05:13
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94d4b16d99

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


::selection {
background: color-mix(in srgb, var(--color-brand) 60%, transparent);
color: #ffffff;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid forcing white selection text

Setting ::selection text color to #ffffff makes selected text hard to read in light theme because the new background is a semi-transparent accent (color-mix(..., transparent)), which becomes a light tint over white surfaces (including default blue accent). This applies globally, so selecting text in inputs/chat can lose contrast; use a contrast-aware foreground (or leave text color unset) instead of hardcoded white.

Useful? React with 👍 / 👎.

@tellaho
Copy link
Copy Markdown
Collaborator Author

tellaho commented Apr 2, 2026

This seems to not be an issue anymore. Closing.

@tellaho tellaho closed this Apr 2, 2026
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.

1 participant