Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Hierdie gesprek is in die argief. Vra asseblief 'n nuwe vraag as jy hulp nodig het.

Change color of blank page before renderization

  • 2 antwoorde
  • 1 het hierdie probleem
  • 23 views
  • Laaste antwoord deur rgomes

more options

I spend 12+ hours a day in front of a computer and blank pages hurt my eyes. I use dark mode wherever possible.

I've changed the background color of about:blank already and it works as I expected.

However, when a request is fired to load a web page, there's a quick transition which may paint the canvas totally blank before starting rendering the requested page. Since this transition may take a couple of seconds sometimes in my environment, the screen flashes blank onto my face, really hurting my eyes used to most of things dark most of the time.

Is there a way to configure the color of this transitioning blank page, please?

Thanks a lot in advance. :-)

I spend 12+ hours a day in front of a computer and blank pages hurt my eyes. I use dark mode wherever possible. I've changed the background color of about:blank already and it works as I expected. However, when a request is fired to load a web page, there's a quick transition which may paint the canvas totally blank before starting rendering the requested page. Since this transition may take a couple of seconds sometimes in my environment, the screen flashes blank onto my face, really hurting my eyes used to most of things dark most of the time. Is there a way to configure the color of this transitioning blank page, please? Thanks a lot in advance. :-)

Gekose oplossing

Answering my own question:

I've created userChrome.css like this:

@-moz-document url(chrome://browser/content/browser.xhtml)
{
  #main-window,
  browser[type="content-primary"],
  browser[type="content"],
  tabbrowser#content,
  #content,
  browser[type="content"] > html
  {
     background: #202020 !important;
  }
}

and I've created userContent.css like this:

@-moz-document url("about:newtab") {
  body {
    background-color: #202020 !important;
  }
}

@-moz-document url("about:blank") {
  body {
    background-color: #202020 !important;
  }
}

@-moz-document url(chrome://browser/content/browser.xhtml) {
  browser[type="content-primary"] {
    background: #202020 !important
  }
}
Lees dié antwoord in konteks 👍 0

All Replies (2)

more options
more options

Gekose oplossing

Answering my own question:

I've created userChrome.css like this:

@-moz-document url(chrome://browser/content/browser.xhtml)
{
  #main-window,
  browser[type="content-primary"],
  browser[type="content"],
  tabbrowser#content,
  #content,
  browser[type="content"] > html
  {
     background: #202020 !important;
  }
}

and I've created userContent.css like this:

@-moz-document url("about:newtab") {
  body {
    background-color: #202020 !important;
  }
}

@-moz-document url("about:blank") {
  body {
    background-color: #202020 !important;
  }
}

@-moz-document url(chrome://browser/content/browser.xhtml) {
  browser[type="content-primary"] {
    background: #202020 !important
  }
}

Gewysig op deur cor-el