Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Pretraži podršku

Izbjegni prevare podrške. Nikad te nećemo tražiti da nas nazoveš, da nam pošalješ telefonski broj ili da podijeliš osobne podatke. Prijavi sumnjive radnje pomoću opcije „Prijavi zlouporabu”.

Saznaj više

Why is the scrollbar in Firefox changing color on certain sites like Youtube?

  • 3 odgovora
  • 1 ima ovaj problem
  • 1 prikaz
  • Posljednji odgovor od cor-el

more options

I have noticed in the last few days that the scrollbar has been changing colors from site to site. On most, it remains a light grey, but on some sites, most notably Youtube, it has turned a darker color, with the scrollbar turning outright black on videos now from Youtube, but only if I'm not signed in. Meanwhile if I'm signed in, it's a darker shade of gray, but not outright black. Does anyone know what's causing this? I will include screenshots, with the scrollbars circled. The first shows the scrollbar in its normal coloration, and the following three showing Youtube, first on its main page, then one with me signed in, another with me signed out, growing progressively darker.

Is this a glitch, or something to do with their coding, or what? If someone can answer this, I'd love to know what I'm dealing with here.

I have noticed in the last few days that the scrollbar has been changing colors from site to site. On most, it remains a light grey, but on some sites, most notably Youtube, it has turned a darker color, with the scrollbar turning outright ''black'' on videos now from Youtube, but only if I'm not signed in. Meanwhile if I'm signed in, it's a darker shade of gray, but not outright black. Does anyone know what's causing this? I will include screenshots, with the scrollbars circled. The first shows the scrollbar in its normal coloration, and the following three showing Youtube, first on its main page, then one with me signed in, another with me signed out, growing progressively darker. Is this a glitch, or something to do with their coding, or what? If someone can answer this, I'd love to know what I'm dealing with here.
Priložene slike ekrana

Svi odgovori (3)

more options

They're just styling their scrollbars with css. You can modify a color and width of the scrollbar on every page.

more options

TyDraniu said

They're just styling their scrollbars with css. You can modify a color and width of the scrollbar on every page.

So it's not a glitch? Huh, weird. Is there a way to overwrite the stylization, or are we basically stuck with it?

more options

You can add code to the userContent.css file.


/* SCROLLBARS */
*{scrollbar-color:auto !important; scrollbar-width:auto !important;}

It is not that difficult to create userContent.css if you have never used it.

The first step is to open the "Help -> Troubleshooting Information" page and find the button to access the profile folder.

You can find the button to go to the profile folder under the "Application Basics" section as "Profile Folder -> Open Folder". If you click this button then you open the profile folder in the Windows File Explorer. You need to create a folder with the name chrome in this folder (name is all lowercase). In the chrome folder you need to create a plain text file with the name userContent.css (name is case sensitive). In this userContent.css text file you paste the text posted. On Mac you can use the TextEdit utility to create the userContent.css file as a plain text file.

In Windows saving the file is usually the only time things get more complicated because Windows can silently add a .txt file extension and you end up with a file named userContent.css.txt. To avoid this you need to make sure to select "All files" in the dialog to save the file in the text editor using "Save File as".

You need to close (Quit/Exit) and restart Firefox when you create or modify the userContent.css file.

See also:

In Firefox 69 and later you need to set this pref to true on the about:config page to enable userChrome.css and userContent.css in the chrome folder.

  • toolkit.legacyUserProfileCustomizations.stylesheets = true