5

The tab close button in Firefox is on the right side. But that feels weird in macOS, where all close buttons are on the left side. Is it possible to move it to the left side, possibly with an extension or a configuration setting?

left-side close buttons

1 Answer 1

6

As luck would have it, the Firefox UI can be customized in ~/Library/Application Support/Firefox/Profiles/<PROFILE_ID>/chrome/userChrome.css. Add the following to that file (valid for Firefox v98):

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

.tabbrowser-tab .tab-throbber,
.tabbrowser-tab .tab-icon-image,
.tabbrowser-tab .tab-sharing-icon-overlay,
.tabbrowser-tab .tab-icon-overlay,
.tabbrowser-tab .tab-label-container,
.tabbrowser-tab .tab-icon-sound {
  -moz-box-ordinal-group: 2 !important;
}
.tabbrowser-tab .tab-label-container {
  margin-left: 2px;
}
.tabbrowser-tab .tab-icon-image {
  margin-left: 3px;
}
.tabbrowser-tab .tab-close-button {
  margin-left: -5px !important;
  margin-right: 2.5px !important;
}
.tabbrowser-tab:not([pinned="true"]):hover .tab-close-button {
  display: -moz-box !important;
}
.tabbrowser-tab:not([pinned="true"]):hover .tab-icon-stack,
.tabbrowser-tab:not([pinned="true"]):hover .tab-throbber,
.tab-close-button {
  display: none;
}

Also, userChrome.css is disabled by default in Firefox 69+, so go to about:config and set toolkit.legacyUserProfileCustomizations.stylesheets to true

Thanks to https://support.mozilla.org/en-US/questions/1157451 for inspiration. I've also added a Gist with this info.

7
  • "Also, userChrome.css is disabled by default in Firefox 69+"... this is the information nobody mentions anywhere. Thank you!
    – Thomas
    Jan 14, 2020 at 11:31
  • Can you update this for the new Proton interface? It still works, but it is a little wonky.
    – jobukkit
    Jul 22, 2021 at 16:00
  • @stommestack Could you elaborate a bit? It looks fine to me (Firefox Developer Edition v91.0b6)
    – neu242
    Jul 23, 2021 at 7:51
  • 1
    @neu242 Here’s what it looks like for me on hovering (the dot on the left is the loading indicator) i.postimg.cc/C12gT5Lk/…
    – jobukkit
    Jul 23, 2021 at 10:03
  • @stommestack Weird, I don't see that here at all. I suggest enabling Browser Toolbox and tweaking the margin-left/right attributes yourself.
    – neu242
    Jul 23, 2021 at 10:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .