Improve contrast of code blocks and tables#176
Open
panozzaj wants to merge 2 commits intoOWASP:mainfrom
Open
Conversation
Change code block background from #999 (mid-grey) to #f6f8fa (light grey) and update syntax highlighting colors to meet WCAG 2.1 AA minimum contrast ratio of 4.5:1. Before: #999 background gave ~3.5:1 contrast with black text, and syntax token colors (deepskyblue, darkkhaki, etc.) ranged from 1.9:1 to 3.9:1 — all failing WCAG AA. After: #f6f8fa background with updated token colors all pass 4.5:1+.
Change $bg-grey from #98afc7 to #e2e8f0. The old value gave only 3.3:1 contrast with black text, failing WCAG AA (4.5:1). The new value provides 17:1 contrast while keeping the alternating row stripe visible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hi, thanks for maintaining the OWASP sites!
I was looking at an issue on one of the sites that uses this
www--site-themebut found it pretty hard to read, especially the code blocks:As a result, I tweaked the code and table styles to have higher contrast and as a result, is a lot easier for me to read:
Would this be a useful contribution? I haven't worked with this codebase in the past, so I'm open to feedback on how to make it better.