10

On my system (I am just running Fluxbox 1.3.7 on FreeBSD 10.3 – but I've seen that on Linux, too) Firefox has a much more narrow scrollbar than on Windows (which also behaves differently).

narrow Firefox scrollbar on Linux

How do I increase the width of the scrollbar?

It would also be nice to get the usual behavior, i.e. clicking on the scrollbar should move the scrollbox just one step up or down and not position it where I clicked.

EDIT: Installing this addon solves the problem (in a not very elegant way). The scrollbar looks ridiculous now, but at least it has a nice width. ;-)

2
  • Not confident it will work with Firefox but you may try to add *Scrollbar*width: 16 to your ~/.Xresources and then source it with xrdb .Xresources. (will affect new instances of windows not already running instances)
    – grochmal
    Commented Aug 20, 2016 at 21:56
  • @grochmal: sadly, this has absolutely no effect.
    – viuser
    Commented Aug 22, 2016 at 18:08

4 Answers 4

18

In about:config, set widget.non-native-theme.scrollbar.size.override to the desired numeric value.

This will only have an effect if widget.non-native-theme.enabled is true (the default as of this writing). Older versions may instead have the setting named widget.non-native-theme.scrollbar.size.

5
  • This doesn't work in 91.5
    – Frotz
    Commented Jan 28, 2022 at 5:43
  • 1
    This works with FF 105. I set mine to 40. Tiny-Elvis says, 'It's huge.' ;)
    – mccurcio
    Commented Oct 17, 2022 at 18:27
  • This works great, but when you grab a slider you cannot pull it down unless you follow the original narrow gutter. Does anyone know if there is a setting to fix that? Commented Feb 10, 2023 at 15:43
  • 1
    Answering my own question above, the slider works fine after restart. Commented Feb 13, 2023 at 16:51
  • This is not an ideal solution, and causes an obstruction, especially if one chooses to enclose a caption using two tick symbols, ``, in a reddit post. I also had difficulty closing the eBay notification (bell icon).
    – gimmegimme
    Commented Mar 8, 2023 at 14:31
7

Ignom's answer is correct, but as of version 89 Firefox no longer honors GTK styling by default. The new setting in about:config widget.non-native-theme.enabled needs to be changed to false.

(I would have made this a comment on Ignom's answer, but I don't have enough rep.)

2
  • This was very helpful, but for me it changed the color of the scrollbar and now it no longer matches the GTK theme's color. Do you happen to know how to fix that?
    – Compholio
    Commented Jan 9, 2022 at 16:38
  • For the color, I had to use about:config to change widget.content.gtk-theme-override to Ambiance.
    – Compholio
    Commented Feb 1, 2022 at 18:31
2

Running Alma linux with firefox version 91.8.0:

This is what worked for me: Enter about:config in browser bar, type in 'scrollbar' to filter:

Find: widget.non-native-theme.scrollbar.size

And change the value to what you want. restart firefox for changes to take effect I set mine to 40 - now clicking the bar is like clicking the side of a barn

1
0

I know 2 ways to increase the Firefox scrollbar width (tested with Firefox 68.9esr and FreeBSD 12.1):

  1. Tune GTK3 style settings
    Firefox is using GTK3. So you can override relevant settings of the GTK3 style you are using. You find the style settings in /usr/local/share/themes/<your style>/gtk-3.20/gtk.css. To override some of the settings use the file ~/.config/gtk-3.0/gtk.css.
    A setup you can use to start your own experiments can be found here.

  2. Use CSS
    Newer Firefox versions allow to use CSS to change the way Firefox displays the GUI (see here for details).
    You need to use the file userContent.css in the subdirectory chrome of your profile folder. With the setting scrollbar-width: auto; you can increase the Firefox scrollbar width (see here for a description).
    Here you can find an easy to handle project to tweak a lot of the Firefox GUI CSS settings, including the scrollbar width (update the settings in ./config/custom_scrollbar_appearance.css and enable its import in your userContent.css).
    Please note, that with newer Firefox versions config settings may prohibit this mechanism (e.g. see about:config preference layout.css.scrollbar-width.enabled).
    Please note further, that if you specify scrollbar relevant settings via CSS, then the GTK3 settings via ~/.config/gtk-3.0/gtk.css are ignored.

With the CSS approach it is currently not possible to specify the exact width of the scrollbar. With GTK3 tuning this is possible and you can also set additional scrollbar properties.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .