Hugo

Inline and block code snippets

I find the color contrast between prose and code snippets too small. What are you guys thoughts on increasing it? Here’s an example before and after. I’m open to any darker shade of gray than what we have.

Before:

pre, code { background-color: #f8f8f8; }

After:

pre, code { background-color: #dfdfdf; }

Both pass the contrast check.

https://webaim.org/resources/contrastchecker/

I personally had no problems, but that might be because of my monitor setup (nerd lair). On a laptop, in the sun it might be hardly visible I guess. While you are at it you should add the same colour to the line on the left side of the solved box?

1 Like