Repository navigation
feat: Updated editor body colors - #3206
matthewlipski wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…hts to have consistent brightness & saturation across colors
|
| @@ -0,0 +1,3876 @@ | |||
| <!doctype html> | |||
There was a problem hiding this comment.
How is this file generated, should it be checked in?
| [data-content-type="quote"] blockquote { | ||
| border-left: 2px solid rgb(125, 121, 122); | ||
| color: rgb(125, 121, 122); | ||
| color: #646362; |
There was a problem hiding this comment.
should the hardcoded colors changed in this file actually be variables instead? Might be nice to clean up at same time
Summary
This PR updates editor body colors (UI elements like menus and toolbars are out of scope) to hit WCAG 2.0 AA contrast requirements and converts their CSS variables to use the OKLCH color space instead of RGB. OKLCH is a polar color space similar to HSL, but has 2 key advantages:
The second advantage is useful to us as it makes it much easier to ensure each highlight color has the same relative saturation and brightness. With HSL/RGB, it takes a lot of trial and error to do this. The first advantage is relevant as the new colors all fall within the sRGB gamut, which pretty much all modern displays have good coverage of.
While the most significant changes have been made to highlight colors, the following colors have been adjusted too to hit the contrast requirements:
Verified that axe scans from out a11y tests no longer report contrast issues. An important thing to note is that placeholder contrast is currently untested and so placeholder colors have not been updated as part of this PR, only colors which have been caught to not pass WCAG contrast requirements when running an axe scan of the editor body. See #3205 for more info.
There's a temporary
highlight-color-comparison.htmlfile to inspect the old vs new highlight colors (to be removed before merging). The screenshots below are taken from it.Closes #2852
Closes #2827
Closes #3043
Rationale
The old colors were hard to read at times and didn't conform to a11y standards.
Changes
Impact
N/A
Testing
axe-core scan no longer brings up contrast issues for editor body.
Screenshots/Video
Checklist
Additional Notes
N/A