Repository navigation
Replies: 25 comments
|
Thanks for the note. Looks interesting. References: /* Keyword values */
scrollbar-color: auto;
scrollbar-color: dark;
scrollbar-color: light;
/* <color> values */
scrollbar-color: rebeccapurple green; /* Two valid colors.
The first applies to the thumb of the scrollbar, the second to the face. */
/* Global values */
scrollbar-track-color: inherit;
scrollbar-track-color: initial;
scrollbar-track-color: unset;https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-width /* Keyword values */
scrollbar-width: auto;
scrollbar-width: thin;
scrollbar-width: none;
/* <length> values */
scrollbar-width: 1em; /* A valid length */
/* Global values */
scrollbar-width: inherit;
scrollbar-width: initial;
scrollbar-width: unset; |
|
I don't understand because in some web pages, no scrollbars appear with the new code. Try: Firefox 64beta with this code: /* Thin Scrollbar */
:root{
scrollbar-color: rgb(210,210,210) rgb(46,54,69) !important;
scrollbar-width: thin !important;
} |
|
Works on the first one for me, but not on the second one. This feature is heavily experimental and I guess Mozilla has a lot to do until it becomes usable for everyone on every page. |
Thank you for the test, then I check on Nightly. |
|
Just tested a few variables provided on those MDN pages by Mozilla. scrollbar-color: dark;
scrollbar-color: light:
scrollbar-width: 1em; |
For me too. |
|
My testing echos what you have found. scrollbar-width: thin is not consistent. Auto width is ok. Setting colors to compliment a theme has challenges. The hover and drag colors are not predictable. Win10-64 & Nightly |
You are right, the "Auto" setting is OK on all web sites but also "None" works fine for the user that want hide completely the scrollbar. |
|
I activated custom_scrollbar_appearance.css in both userChrome.css and userContent.css and the only place it is not a thin right side scrollbar is on about: pages. This happens with both unmodified userContent.css and modified. Scrollbars in web pages are not thin. It also seems that scrollbar-track-color has to have a color value. With Nightly, disabling the track color voids the thin width setting. No matter what color value that the track color is given there is no visible change to the scrollbar. :root{
scrollbar-color: #B8BDC4 #6F7E8E;
scrollbar-track-color: yellow;
scrollbar-width: thin;
} |
|
Still no thin scrollbar in some web site like https://www.liberoquotidiano.it/ on last Nightly with your code in both user css files. |
|
Your custom_scrollbar_appearance.css is only the name or what? |
|
Its only a reference to this file: https://github.com/Aris-t2/CustomCSSforFx/blob/master/classic/config/custom_scrollbar_appearance.css |
|
@happysurf |
|
I have finished my test just now, with last Nightly with clean profile and the userChrome.css and userContent.css with your code only. |
|
@happysurf |
|
I'm using custom_scrollbars.uc.js since it offers far more customization possibilities and I hope one day Mozilla will offer a user friendly way to configure scrollbar appearance inside Firefox settings:
|
No, I have tested only the custom_scrollbar_appearance.css code but soon I want try the script. :-) |
|
Has anyone been able to do any useful styling on the colored scrollbars without resorting to javascript hackery? (I will not use a method that is guaranteed to stop working soon, and I will not take files from a project whose documentation I cannot read.) Specifically, the DevTools now use these flat rectangular abominations of scrollbars, of which the only aspects I have been able to customize are the thumb color (and opacity) and the track color (and opacity). If I set them to the same color, the thumb is invisible; if I set them to different colors, the thumb is distracting. I’d like them roughly the same color but different texture, with gradients and borders to help me read the scrollbar, but without color contrast to distract me. |
|
In Linux & I assume Windows, you can modify the current theme being used to change the scrollbar & almost any element in apps, various pages, menus, etc., in the OS. Almost anything if you dig deep enough. In several Linux distros, GTK based themes are popular. Many distros come w/ several themes. The included ones are pretty basic what they color, change element sizes or set font styles, sizes. You can modify those if you want or get themes from trusted sites that host themes ranging from basic to way over the top. In Linux (maybe Windows?) different apps use different versions of GTK - either version 2 or 3, for now. Older apps often use GTK-2, where the gtkrc file is the main file holding the theme values. If you only want to change one element, you can usually find what to edit in the file. More recent app versions often use gtk-3 themes, which use mostly *.css files for the bulk of instructions. The main file where gtk3 changes are made to affect the UI is gtk-widgets.css, found in each separate theme under the gtk3 directory. Some apps like Firefox may use some gtk2 & gtk3 code for various elements. |
|
Any idea if it's possible to change the position? Or just the appearance? I mean without js. |
|
You can only change what is mentioned here: |
|
Recently, I ran into a website where the background color they picked, caused the scrollbar colors to be inverted (I clicked like an idiot for a while without understanding why it wasn't scrolling normally before figuring it out). By setting the about:config property While this is not CSS, it may be useful to have this info around for people looking for way to change appearances, not necessarily CSS. |
|
Mozilla Firefox gets Windows 11 Style Scrollbars. The new feature is applied behind a pref and you can see the change straight away with Scrollbar on websites when using Firefox 97 on Windows 11. The Pref widget.non-native-theme.scrollbar.style has current options: ‘0’: Default Platform scrollbar style You can have fun by changing the pref with the above values. You can set Android, Mac, and GTK Scrollbars for Firefox on Windows. As the new Scrollbar code hasn’t been made into Firefox stable, creating and setting the pref value to ‘5’ or ‘0’ doesn’t work as of now. Currently, Mozilla is targetting Windows 11 Scrollbars for Firefox in version 97. |
|
Running FF 104 on Linux. Unfortunately, scrollbar-width: no longer accepts non keyword (thin, hidden, etc.) values. Anyone know how to set an arbitrary width for the main scrollbar? Thanks. |


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Now is possible change the scrollbar colors and width in userContent.css without any script.
Look this interesting discussion on Reddit:
https://www.reddit.com/r/FirefoxCSS/comments/98j1a7/psa_you_can_change_scrollbar_properties_directly/
This is the result:
All reactions