Skip to content

Lightly adjust font colors for code blocks

Marcel Amirault requested to merge docs-code-blocks-color-custom into main

Resolves #990 (closed)

I think this is a better MVC for the contrast issue with code blocks. I used the Wave accessibility tool to more carefully figure out which specific colors were the issue, and then I used https://webaim.org/resources/contrastchecker/ to tweak the colors slightly, to improve the contrast. It's a small tweak, but I definitely prefer it. It fixes the warnings, and won't be as big a change as the other POCs I tried.

The red is lightened slightly, and the dark code comments are lightened slightly as well. This now passes the Wave tool testing.

  • Before:

    Screen_Shot_2021-06-17_at_13.01.09

  • After:

    Screen_Shot_2021-06-17_at_13.01.17

Edited by Marcel Amirault

Merge request reports