Skip to content
Snippets Groups Projects
Commit e8eefc25 authored by henry's avatar henry Committed by morgan
Browse files

fixup! Bug 7494: Create local home page for TBB.

Bug 42744: Stop using prefersColorSchemeOverride for about:tor.

common-shared.css seems to have simplified since the original
implementation, so we can simply set the `color-scheme` and `color` on
the search form to keep the styling consistent in both light and dark
themes.
parent a8d1d771
Branches
No related tags found
2 merge requests!1202Bug_43099: 2024 YEC Strings,!1141Stop using prefersColorSchemeOverride for about:tor
......@@ -2,19 +2,6 @@
* Actor child class for the about:tor page.
*/
export class AboutTorChild extends JSWindowActorChild {
actorCreated() {
if (this.contentWindow.matchMedia("not (prefers-contrast)").matches) {
// When prefers-contrast is not set, the page only has one style because
// we always set a dark background and a light <form>.
// We force prefers-color-scheme to be light, regardless of the user's
// settings so that we inherit the "light" theme styling from
// in-content/common.css for the <form> element. In particular, we want
// the light styling for the <input> and <moz-toggle> elements, which are
// on a light background.
this.browsingContext.prefersColorSchemeOverride = "light";
}
}
handleEvent(event) {
switch (event.type) {
case "DOMContentLoaded":
......
......@@ -180,15 +180,17 @@ body:not(.show-tor-check) #tor-check {
body > :not(#search-form) {
/* Same as --in-content-page-color when "prefers-color-scheme: dark" */
--in-content-page-color: #fbfbfe;
--in-content-text-color: #fbfbfe;
color: var(--in-content-text-color);
color: var(--color-gray-05);
--link-color: var(--tor-link-color-dark);
--link-color-hover: var(--tor-link-color-hover-dark);
--link-color-active: var(--tor-link-color-active-dark);
}
#search-form {
/* Use light color for background and moz-toggle shadow root. */
color-scheme: light;
/* Same as --in-content-page-color when "prefers-color-scheme: light" */
color: var(--color-gray-100);
border-color: transparent;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment