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

Code block contrast ratio #4486

Open
4 tasks done
willhack opened this issue Jan 10, 2025 · 0 comments · May be fixed by #4487
Open
4 tasks done

Code block contrast ratio #4486

willhack opened this issue Jan 10, 2025 · 0 comments · May be fixed by #4487

Comments

@willhack
Copy link

Describe the bug

While auditing another site (which uses vitepress), I noticed the contrast ratio on code languages and line numbers doesn't meet WCAG guidelines.

Looking back to color system PR #2797 it seems as though --vp-c-text-3 was not intended to be used with --vp-c-bg-alt

XXX-3: The color for solid background, such as bg color of the button. It must satisfy the contrast ratio with pure white (#ffffff) text on top of it

I have a possible fix available and will submit a PR

System Info

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Max
    Memory: 5.63 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 131.0.6778.265
    Edge: 131.0.2903.112
    Safari: 17.5

Validations

@willhack willhack linked a pull request Jan 10, 2025 that will close this issue
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 a pull request may close this issue.

1 participant