Skip to content
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(theme): improve contrast of search highlight text #2887

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

skirtles-code
Copy link
Contributor

This PR changes the text color used for highlights within the local search. This is to improve the contrast in light mode.

The screenshot below shows:

  1. First row - prior to feat(theme): improve color system #2797. Note that the background-color for highlights is the same for both light and dark mode.
  2. Second row - current VitePress theme. The background-color is using the green theme, which varies between dark and light mode. In light mode, both the text and background are dark.
  3. Third row - this PR. The color for the text in light mode is now white, for greater contrast with the background.

image

I've used --vp-c-neutral-inverse for the text. I'm unclear if this is the correct variable, but it gives the desired result of black or white, depending on the current theme mode.

@brc-dd brc-dd merged commit 20f9770 into vuejs:main Aug 31, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants