-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix code selection background colors #3396
Conversation
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. |
@Harshit-7373 I have just used the colors that were already defined in the code to be background colors for selection, and used them to override the corresponding CodeMirror CSS properties. Design wise, I have only chosen one new color (from the predefined color variables) which is the background color for selection in the high contrast theme. I am open to changing it if required, upon further discussion. |
Yes, I think the discussion does illustrate that we probably want the highlight color to be a predefined
Since this change is pretty small and contained, I feel like what we have a good idea of what we want the end result to look like, which is to have an appropriate contrast between the text and the highlight. I think this feels okay for me, and looks good in the Dark contrast mode as well. Thanks so much for your work on this! |
Fixes #1742
Changes:
Define background colors to be shown when code is selected (For light and dark theme, they were already defined, but not used properly. For high contrast mode, the background color selected is WCAG AA compliant.)
Properly override CodeMirror defaults corresponding to the following CSS styles defined by
codemirror.css
Comparison (High Contrast Mode):
I have verified that this pull request:
npm run lint
)npm run test
)develop
branch.Fixes #123