DEV Community

Discussion on: What is the color of a blank page?

Collapse
 
peke314 profile image
Victor Janin

Great Article!
so if we leave our html/body without any background, and the browser changes to dark mode, would that change the browser background?

Collapse
 
bcalou profile image
Bastien Calou

Thanks!
The answer seems compicated.
I just tried the #enable-force-dark flag to force dark mode on every site on Chrome.
It looks like it doesn't try to replace black background with white : it considers white to be black ! (see screenshot)
So background-color: white | transparent | black | none has the same effect : you see black. I think that yes, the browser's background changes, but that's really a wild guess.
Maybe something to explore in another article ;)

Collapse
 
bcalou profile image
Bastien Calou