MozillaZine

How to change highlight color

User Help for Mozilla Firefox
LeeU
 
Posts: 71
Joined: January 30th, 2004, 2:25 pm

Post Posted October 25th, 2020, 2:43 pm

When I use Firefox v82 I get a dark blue highlight on web pages, URL bar, etc. How to I change this?

morat
 
Posts: 4098
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 25th, 2020, 5:33 pm

Here is how to change the urlbar.

Code: Select all
/* Firefox userChrome.css */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");

#urlbar html|input#urlbar-input::selection {
  background-color: peachpuff !important;
}

http://kb.mozillazine.org/UserChrome.css

Remember to set the toolkit.legacyUserProfileCustomizations.stylesheets preference to true, then restart.

P.S.

The selection process on a web page is more complicated.

The highlight color varies after doing a select all (ctrl+a) command on the following page.

HTML Color Names
http://www.w3schools.com/colors/colors_names.asp

LeeU
 
Posts: 71
Joined: January 30th, 2004, 2:25 pm

Post Posted October 26th, 2020, 10:13 am

That worked great! I just wished I could change the other highlight. I seem to remember doing it before but have forgot (or maybe I didn't).

morat
 
Posts: 4098
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 26th, 2020, 11:36 am

You won't see the selection on a pink page with the following style.

Code: Select all
/* Firefox userContent.css */

::selection {
  -moz-appearance: none !important;
  color: red !important;
  background-color: pink !important;
}

http://kb.mozillazine.org/UserContent.css

LeeU
 
Posts: 71
Joined: January 30th, 2004, 2:25 pm

Post Posted October 26th, 2020, 12:33 pm

Bingo! That's it! Only I changed the background color to khaki and the color to black. Many thanks!

morat
 
Posts: 4098
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 31st, 2020, 6:41 pm

You can also use the following preferences.

* ui.textSelectBackground
* ui.textSelectForeground

Reference
http://searchfox.org/mozilla-release/search?q=ui.textSelectBackground

Return to Firefox Support


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Google Adsense [Bot] and 7 guests