Why does the blank page on every web browsers stays white even on dark mode?

136 views

In some browsers, it’s the `about:blank` page. Tried googling around, but the answers are all too technical for a non tech person to understand, let alone a five years old

In: 4

3 Answers

Anonymous 0 Comments

I can’t give you a technical explanation, but I can tell you that this doesn’t happen of firefox.

Anonymous 0 Comments

There isn’t really a reason, other than that “this is what the browser has been written to do”

There’s no particular rule about how browsers must treat blank pages, but a reasonable thing to do is just to render it as a normal page with no content, applying whatever default styles the browser has.

And most browsers have apparently been made to use default styles that render the page white. It’s not something that’s really guided by a standard or specification, so browsers can do what they want.

But if they render the page white in dark mode it is probably more an oversight than anything. File a bug report and see if they’ll fix it.

Anonymous 0 Comments

You know how web pages can have different fonts, colors, backgrounds, layouts etc. You can achieve all that by defining styles for those elements.

Every web browser implements a default style (which is mostly uniform across browsers). That is what you see if you just take a text file (text.txt), rename the extension to html (text.html) and open it in a browser.

It’s also useful because if all you want is to make the text bigger you don’t have to define everything else like spacing, flow, border etc. Those will follow the default styling.

The about:blank page is just an empty html with no content or styling, so the background takes on the default style, which is white.

It’s possible for browsers to overwrite these defaults in dark mode or even just for the about:blank page, but that would potentially cause more problems as it could break sites that don’t care about dark mode settings.

Imagine if your site has dark blue font color on a white background, since the default background is already white there’s no reason to explicitly redefine it as such. Now, if a browser were to redefine it to black on dark mode your site would break as the text would be unreadable.

0 views

In some browsers, it’s the `about:blank` page. Tried googling around, but the answers are all too technical for a non tech person to understand, let alone a five years old

In: 4

3 Answers

Anonymous 0 Comments

I can’t give you a technical explanation, but I can tell you that this doesn’t happen of firefox.

Anonymous 0 Comments

There isn’t really a reason, other than that “this is what the browser has been written to do”

There’s no particular rule about how browsers must treat blank pages, but a reasonable thing to do is just to render it as a normal page with no content, applying whatever default styles the browser has.

And most browsers have apparently been made to use default styles that render the page white. It’s not something that’s really guided by a standard or specification, so browsers can do what they want.

But if they render the page white in dark mode it is probably more an oversight than anything. File a bug report and see if they’ll fix it.

Anonymous 0 Comments

You know how web pages can have different fonts, colors, backgrounds, layouts etc. You can achieve all that by defining styles for those elements.

Every web browser implements a default style (which is mostly uniform across browsers). That is what you see if you just take a text file (text.txt), rename the extension to html (text.html) and open it in a browser.

It’s also useful because if all you want is to make the text bigger you don’t have to define everything else like spacing, flow, border etc. Those will follow the default styling.

The about:blank page is just an empty html with no content or styling, so the background takes on the default style, which is white.

It’s possible for browsers to overwrite these defaults in dark mode or even just for the about:blank page, but that would potentially cause more problems as it could break sites that don’t care about dark mode settings.

Imagine if your site has dark blue font color on a white background, since the default background is already white there’s no reason to explicitly redefine it as such. Now, if a browser were to redefine it to black on dark mode your site would break as the text would be unreadable.