Bug 1471162 - Stop using fake floating scrollbar in OSX dark theme;r=pbro
MozReview-Commit-ID: 8nFpHCWojYC
--- a/devtools/client/shared/theme-switching.js
+++ b/devtools/client/shared/theme-switching.js
@@ -84,18 +84,18 @@
const loadEvents = [];
for (const url of newThemeDef.stylesheets) {
const {styleSheet, loadPromise} = appendStyleSheet(document, url);
devtoolsStyleSheets.get(newThemeDef).push(styleSheet);
loadEvents.push(loadPromise);
}
- if (os !== "win") {
- // Windows always uses native scrollbars, other platforms still use custom floating
+ if (os !== "win" && os !== "mac") {
+ // Windows & Mac always use native scrollbars, Linux still uses custom floating
// scrollbar implementation.
try {
const StylesheetUtils = require("devtools/shared/layout/utils");
const SCROLLBARS_URL = "chrome://devtools/skin/floating-scrollbars-dark-theme.css";
if (!Services.appShell.hiddenDOMWindow
.matchMedia("(-moz-overlay-scrollbars)").matches) {
if (newTheme == "dark") {
StylesheetUtils.loadSheet(window, SCROLLBARS_URL, "agent");
--- a/devtools/client/themes/dark-theme.css
+++ b/devtools/client/themes/dark-theme.css
@@ -22,17 +22,18 @@ body {
color: var(--theme-toolbar-color);
}
::-moz-selection {
background-color: var(--theme-selection-background);
color: var(--theme-selection-color);
}
-:root[platform="win"] {
+:root[platform="win"],
+:root[platform="mac"] {
/* Set colors for native scrollbars on Windows dark theme */
/* Other platforms support for scrollbar theming is Bug 1460109 */
scrollbar-face-color: var(--theme-body-color-inactive);
scrollbar-track-color: var(--theme-splitter-color);
}
.theme-selected,
.CodeMirror-hint-active {