Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Change color of blank page before renderization

  • 2 trả lời
  • 1 gặp vấn đề này
  • 184 lượt xem
  • Trả lời mới nhất được viết bởi 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. :-)

Giải pháp được chọn

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
  }
}
Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (2)

more options
more options

Giải pháp được chọn

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
  }
}

Được chỉnh sửa bởi cor-el vào