yari icon indicating copy to clipboard operation
yari copied to clipboard

Add a background color to good/bad codeblock examples

Open queengooborg opened this issue 3 years ago • 2 comments

This PR adds a green and red tint respectively to the background of good/bad example codeblocks. This helps distinguish good vs. bad examples much better, as the icons in the corner are easily missable at a glance.

Before: Screen Shot 2022-08-10 at 19 56 52

After: Screen Shot 2022-08-10 at 19 57 08

I tested this in both dark and light theme, and under various colorblindness types -- this change does not negatively impact colorblind readers, and only either improves the experience or has no impact.

queengooborg avatar Aug 11 '22 02:08 queengooborg

@queengooborg Could you please add screenshots for the light theme as well? I will then ping our product designer to review the changes.

caugner avatar Aug 16 '22 16:08 caugner

Sure thing, got a screenshot ~~after searing my eyes from the burning light~~ in light mode here:

Screen Shot 2022-08-16 at 09 51 31

queengooborg avatar Aug 16 '22 16:08 queengooborg

Fixed https://github.com/mdn/yari/issues/5686.

caugner avatar Sep 02 '22 10:09 caugner