patch-ext icon indicating copy to clipboard operation
patch-ext copied to clipboard

White font color - makes diff unreadable when Chrome is switched to dark mode

Open klonos opened this issue 3 years ago • 2 comments

This is what I am seeing lately (I imagine after a recent Chrome update - currently running Version 102.0.5005.61 (Official Build) (x86_64)):

image

klonos avatar Jun 22 '22 18:06 klonos

Thanks for reporting this. I'll take a look. I guess some fixes on css/js are needed. It'll be nice if anyone can directly provide the fixes.

daviddengcn avatar Jun 22 '22 20:06 daviddengcn

The issue is not with the chrome update. When you have dark mode enabled the background stays white but the font colour get changed from dark to light automatically. That causes the test to disappear into the white background. Turning off dark mode renders the diff perfectly fine even on the latest chrome releases.

Toggling the render preference in the development tools and setting prefers-color-scheme: light changes it for just the page back to a readable view without needing to change the whole browser back to light mode.

Wrapping the background setting in:

@media (prefers-color-scheme: dark) {
...
}
@media (prefers-color-scheme: light) {
...
}

wilfred-s avatar Aug 04 '22 05:08 wilfred-s