Closed Bug 1402791 Opened 2 years ago Closed Last year

Allow WebExtensions to style the scrollbars in web pages


(WebExtensions :: Frontend, defect, P5)



(Not tracked)



(Reporter: kernp25, Unassigned)




(Whiteboard: [design-decision-approved])

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20170922220129

Expected results:

It would be nice if WebExtensions could style the scrollbars in web pages.
Maybe add some new api for this?

Maybe something like this:

I have read this bug:
But this bug is about adding agent stylesheets.

Or maybe firefox could support something like:
::-webkit-scrollbar {
    width: 13px;
    height: 13px;

this will become:
::-gecko-scrollbar {
    width: 13px;
    height: 13px;

I think
::-servo-scrollbar {
    width: 13px;
    height: 13px;

makes more sense :)
Component: WebExtensions: General → WebExtensions: Frontend
Whiteboard: [design-decision-needed]
Priority: -- → P5
Hi kernp25, this has been added to the agenda for the October 17 WebExtensions APIs triage meeting. Would you be able to join us? 

Here's a few things about the triage to keep in mind: 

* We normally spend 5 minutes per bug
* The more information in the bug, the better
* The goal of the triage is to give a general thumbs up or thumbs down on a proposal; we won't be going deep into implementation details

Relevant Links: 

* Wiki for the meeting:
* Meeting agenda:
* Vision doc for WebExtensions:
Isn't this bug 77790 and not possible at the moment?
(In reply to Jan Andre Ikenmeyer [:darkspirit] from comment #3)
> Isn't this bug 77790 and not possible at the moment?
(bug 77790 comment 134)
Maybe bug 1397874 will have a dependency that could make this possible? (I have no idea what I'm talking about.)
Bug 77790 is about making scrollbar styling available to web pages. This bug is for extensions.

The situation is that old-style extensions were able to target scrollbars via a user-agent level stylesheet (which was probably a unintended) like for example [1]. Additionally, at some point in time it was also possible to style them via userChrome.css. Both extensions and userChrome.css are no longer able to change scrollbars in any way in 57+.

As a solution, I could see Firefox implementing ::-webkit-scrollbar [2] as a short-term solution and then work towards a web standard for styling them in the long term.

Blocks: themingapi
Flags: needinfo?(amckay)
Whiteboard: [design-decision-needed] → [design-decision-approved]
Feedback from the meeting was that this seems reasonable and should probably part of the theming API.
Flags: needinfo?(amckay)
Ever confirmed: true
Blocks: themingapi-more-ui
No longer blocks: themingapi
That's a good idea:
Using userChrome.css is not so easy for everybody (like me).

I prefer the use of an addon like Stylish or Stylus and manage ALL my style in ONE place.

And please don't restrict our usertyles to only the webpage:
I want style the Firefox interface.
i want style the Mobile Addon page too, without try to fight against this crazy CSP....
Product: Toolkit → WebExtensions
Firefox now supports which lets webpages style scrollbars. Extensions like Dark Reader or Midnight Lizard can inject a content script on every page to in order to style the scrollbars.
No longer blocks: themingapi-more-ui
Closed: Last year
Resolution: --- → FIXED
Tim, could you please provide a cross-reference to the implementation bug id for the support of this? I just found this 18 year old bug which still has the status new:
Here's the implementation bug for the spec: bug 1460109
You need to log in before you can comment on or make changes to this bug.