Closed Bug 1402791 Opened 7 years ago Closed 6 years ago

Allow WebExtensions to style the scrollbars in web pages

Categories

(WebExtensions :: Frontend, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kernp25, Unassigned)

References

()

Details

(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: browser.scrollbars or browser.tabs.setScrollbarStyle? I have read this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1397345 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; } from https://webkit.org/blog/363/styling-scrollbars/
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: https://wiki.mozilla.org/Add-ons/Contribute/Triage * Meeting agenda: https://docs.google.com/document/d/1oUFGD57_NGbtV5y8k_yIS3GN8pFO3M_K1SWQhzlq6Ho/edit#heading=h.hhpni8ijl0wx * Vision doc for WebExtensions: https://wiki.mozilla.org/WebExtensions/Vision
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. [1] https://github.com/silverwind/overlay-scrollbars/blob/master/overlay-scrollbars.css [2] https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-scrollbar
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)
Status: UNCONFIRMED → NEW
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 https://www.w3.org/TR/css-scrollbars-1/ 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
Status: NEW → RESOLVED
Closed: 6 years ago
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: https://bugzilla.mozilla.org/show_bug.cgi?id=77790
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.