fix(theme): code block contrast ratio #4487
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #4486
Description
This PR moves the underlying colors for
—vp-code-lang-color
and--vp-code-line-number-color
from--vp-c-text-3
to--vp-c-text-2
which bumps the threshold enough to meet AA compliance.Additional images & considerations
--vp-c-text-2
is the same color used by the code block tabs as well and it seems nicely balanced.Visual examples of the updates for line number
Note
The Shiki theme also doesn't meet the threshold, but I thought since that was an example of custom theming it was better to leave as is. There might be a consideration to update the bg color of shiki code blocks, but that is out of scope for this work.