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): code block contrast ratio #4487

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

willhack
Copy link

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.

gs-light-post gs-dark-post

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

lnl-post lnd-post

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.

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.

Code block contrast ratio
1 participant