Skip to content

Light theme override for "about:tor" is inherited by chrome error pages.

From #42741 (comment 3048195).

  1. open "about:tor".
  2. Type doesnotexistdoesnotexist.com into the URL bar for the same tab ("about:neterror"). Light background.
  3. Type https://self-signed.badssl.com/ into the URL bar ("about:certerror"). Light background.
  4. Type http.badssl.com into the URL bar ("about:httpsonlyerror"). Light background.
  5. Type "about:blank" into the URL bar. Light background.
  6. Type "example.org".
  7. Repeat one of the above urls. Now a dark background, as expected.

I've not noticed this with other "about:" pages. I think it is this color scheme override for "about:tor", which is in place because "about:tor" does not have light/dark variants, but we want to inherit one of them consistently from firefox styling. But I guess the next chrome error page inherits it as well!

I guess we could unset this when "about:tor" is closing, but I'm not 100% sure what is going on here, and whether the override is just a bad idea in general.

Given this was quite a hacky choice I made when implementing this, I think we could just overwrite the styling rules in CSS we need for this page (like "about:privatebrowsing" does). Note we already do so to get the dark theme text color, but this would take a bit more work for the form elements which use more colors. Plus, since we still need common-shared.css, there is a chance that an upstream change would make this page look differently in the light and dark themes, even though it is meant to look the same for both themes.

/cc @donuts

/cc @ma1 maybe you know of a better approach, or might know what is happening in more detail. When does the browsingContext get replaced or refreshed?

/cc @pierov I couldn't find the other issue you mentioned.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information