Remove broken scrollbar theming, #103
This commit is contained in:
parent
b01d6418ab
commit
e9620b68dc
|
@ -8,7 +8,6 @@
|
||||||
@import "parts/sidebar.css";
|
@import "parts/sidebar.css";
|
||||||
@import "parts/popups.css";
|
@import "parts/popups.css";
|
||||||
@import "parts/remove-white-flash.css";
|
@import "parts/remove-white-flash.css";
|
||||||
@import "parts/scrollbars.css";
|
|
||||||
@import "parts/icons.css";
|
@import "parts/icons.css";
|
||||||
@import "colors/light.css";
|
@import "colors/light.css";
|
||||||
@import "colors/dark.css";
|
@import "colors/dark.css";
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
/* Scrollbars hack */
|
|
||||||
|
|
||||||
@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
|
||||||
|
|
||||||
toolbarbutton#alltabs-button {
|
|
||||||
-moz-binding: url("scrollbars.xml#js");
|
|
||||||
}
|
|
||||||
|
|
||||||
#alltabs-button:not(#hack) {
|
|
||||||
list-style-image: none !important;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#alltabs-button:not(#hack) .toolbarbutton-icon {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
#alltabs-button:not(#hack) .toolbarbutton-badge-stack {
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
#alltabs-button::before {
|
|
||||||
position: relative;
|
|
||||||
top: 2px;
|
|
||||||
content: url("../icons/pan-down-symbolic.svg");
|
|
||||||
}
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
#alltabs-button::before {
|
|
||||||
filter: invert(100%) brightness(200%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#alltabs-button:-moz-window-inactive::before {
|
|
||||||
opacity: 0.7 !important;
|
|
||||||
}
|
|
|
@ -1,125 +0,0 @@
|
||||||
(function () {
|
|
||||||
var css = `
|
|
||||||
@namespace url(http: //www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
|
|
||||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
|
||||||
|
|
||||||
/* Colours - can't be read from chrome CSS. Setting on :root doesn't work. */
|
|
||||||
:not(select):not(hbox) > scrollbar {
|
|
||||||
--gnome-scrollbars-hover-bgcolor: rgba(192, 192, 192, 0.75);
|
|
||||||
--gnome-scrollbars-hover-border-color: rgba(192, 192, 192, 0.75);
|
|
||||||
--gnome-scrollbars-thumb-bgcolor: rgba(0, 0, 0, 0.32);
|
|
||||||
--gnome-scrollbars-thumb-blend-mode: multiply;
|
|
||||||
--gnome-scrollbars-thumb-outline: 1px solid rgba(255, 255, 255, 0.4);
|
|
||||||
--gnome-scrollbars-thumb-hover-bgcolor: #75797a;
|
|
||||||
--gnome-scrollbars-thumb-active-bgcolor: #4a90d9;
|
|
||||||
}
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:not(select):not(hbox) > scrollbar {
|
|
||||||
--gnome-scrollbars-hover-bgcolor: rgba(29, 30, 31, 0.75);
|
|
||||||
--gnome-scrollbars-hover-border-color: rgba(13, 17, 18, 0.75);
|
|
||||||
--gnome-scrollbars-thumb-bgcolor: rgba(252, 254, 251, 0.58);
|
|
||||||
--gnome-scrollbars-thumb-blend-mode: screen;
|
|
||||||
--gnome-scrollbars-thumb-outline: 1px solid rgba(0, 0, 0, 0.4);
|
|
||||||
--gnome-scrollbars-thumb-hover-bgcolor: #d4d5d4;
|
|
||||||
--gnome-scrollbars-thumb-active-bgcolor: #15539e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* All states */
|
|
||||||
:not(select):not(hbox) > scrollbar {
|
|
||||||
-moz-appearance: none !important;
|
|
||||||
position: relative;
|
|
||||||
box-sizing: border-box !important;
|
|
||||||
background-color: transparent;
|
|
||||||
background-image: none;
|
|
||||||
z-index: 1;
|
|
||||||
pointer-events: auto;
|
|
||||||
width: auto !important;
|
|
||||||
border-style: solid !important;
|
|
||||||
display: flex !important;
|
|
||||||
justify-content: flex-end;
|
|
||||||
transition: all 0.1s linear;
|
|
||||||
}
|
|
||||||
scrollbar[root="true"] {
|
|
||||||
z-index: 2147483647 !important;
|
|
||||||
}
|
|
||||||
.panel-subview-body > scrollbar[orient="vertical"] {
|
|
||||||
width: 16px !important;
|
|
||||||
}
|
|
||||||
:not(select):not(hbox) > scrollbar[orient="vertical"] {
|
|
||||||
border-width: 0 0 0 1px;
|
|
||||||
-moz-margin-start: -13px;
|
|
||||||
}
|
|
||||||
:not(select):not(hbox) > scrollbar[orient="horizontal"] {
|
|
||||||
border-width: 1px 0 0 0;
|
|
||||||
margin-top: -13px;
|
|
||||||
}
|
|
||||||
:not(select):not(hbox) > scrollbar thumb {
|
|
||||||
-moz-appearance: none !important;
|
|
||||||
mix-blend-mode: var(--gnome-scrollbars-thumb-blend-mode);
|
|
||||||
/* Make handle edge-grabbable */
|
|
||||||
border: 3px solid transparent;
|
|
||||||
background-clip: padding-box;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
:not(select):not(hbox) > scrollbar[orient="vertical"] thumb {
|
|
||||||
min-height: 44px !important;
|
|
||||||
}
|
|
||||||
:not(select):not(hbox) > scrollbar[orient="horizontal"] thumb {
|
|
||||||
min-width: 44px !important;
|
|
||||||
}
|
|
||||||
/* Unhovered */
|
|
||||||
:not(select):not(hbox) > scrollbar {
|
|
||||||
background-color: transparent;
|
|
||||||
border-color: transparent;
|
|
||||||
}
|
|
||||||
:not(select):not(hbox) > scrollbar[orient="vertical"] {
|
|
||||||
padding: 0 1px 0 5px;
|
|
||||||
margin-right: -3px;
|
|
||||||
width: 0px !important;
|
|
||||||
}
|
|
||||||
:not(select):not(hbox) > scrollbar[orient="horizontal"] {
|
|
||||||
padding: 5px 0 1px 0;
|
|
||||||
margin-bottom: -3px;
|
|
||||||
height: 16px !important;
|
|
||||||
}
|
|
||||||
:not(select):not(hbox) > scrollbar thumb {
|
|
||||||
background-color: var(--gnome-scrollbars-thumb-bgcolor);
|
|
||||||
outline: var(--gnome-scrollbars-thumb-outline);
|
|
||||||
outline-offset: -3px;
|
|
||||||
-moz-outline-radius: 3px;
|
|
||||||
}
|
|
||||||
/* Hovered scrollbar */
|
|
||||||
:not(select):not(hbox) > scrollbar:hover {
|
|
||||||
background-color: var(--gnome-scrollbars-hover-bgcolor);
|
|
||||||
border-color: var(--gnome-scrollbars-hover-border-color);
|
|
||||||
}
|
|
||||||
:not(select):not(hbox) > scrollbar:hover thumb {
|
|
||||||
outline-width: 0;
|
|
||||||
}
|
|
||||||
:not(select):not(hbox) > scrollbar[orient="vertical"]:hover {
|
|
||||||
padding: 0 1px 0 0;
|
|
||||||
margin-right: -1px;
|
|
||||||
width: 14px !important;
|
|
||||||
}
|
|
||||||
:not(select):not(hbox) > scrollbar[orient="horizontal"]:hover {
|
|
||||||
padding: 0 0 1px 0;
|
|
||||||
margin-bottom: -1px;
|
|
||||||
height: 14px !important;
|
|
||||||
}
|
|
||||||
/* Hovered thumb */
|
|
||||||
:not(select):not(hbox) > scrollbar:hover thumb:hover {
|
|
||||||
background-color: var(--gnome-scrollbars-thumb-hover-bgcolor);
|
|
||||||
}
|
|
||||||
/* Grabbed thumb */
|
|
||||||
:not(select):not(hbox) > scrollbar:hover thumb:active {
|
|
||||||
background-color: var(--gnome-scrollbars-thumb-active-bgcolor);
|
|
||||||
mix-blend-mode: normal;
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
|
|
||||||
var uri = makeURI('data:text/css;charset=UTF=8,' + encodeURIComponent(css));
|
|
||||||
sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET)
|
|
||||||
})();
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<bindings id="generalBindings"
|
|
||||||
xmlns="http://www.mozilla.org/xbl"
|
|
||||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
||||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
|
||||||
|
|
||||||
<binding id="js">
|
|
||||||
<implementation>
|
|
||||||
<constructor><![CDATA[
|
|
||||||
function makeRelativePathURI(name) {
|
|
||||||
let absolutePath = Components.stack.filename;
|
|
||||||
return absolutePath.substring(0, absolutePath.lastIndexOf("/") + 1) + name;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The following code executes in the browser context,
|
|
||||||
// i.e. chrome://browser/content/browser.xul
|
|
||||||
Services.scriptloader.loadSubScript(makeRelativePathURI("scrollbars.js"), window);
|
|
||||||
]]></constructor>
|
|
||||||
</implementation>
|
|
||||||
</binding>
|
|
||||||
</bindings>
|
|
Loading…
Reference in New Issue