Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 27 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henrik242/3abf4c52ebf81add5cfe38acf97c2053 to your computer and use it in GitHub Desktop.
Save henrik242/3abf4c52ebf81add5cfe38acf97c2053 to your computer and use it in GitHub Desktop.
Tab close button on the left in Firefox Quantum
@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;
}
@valrus
Copy link

valrus commented Oct 13, 2023

@int-369 @fossilet Here's a fixed version (for me) that replaces favicons with close buttons on hover on Firefox >113:

.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 {
  order: 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]):hover .tab-close-button {
  /* display: -moz-box !important; */
  display: inline-flex !important;
}

.tabbrowser-tab:not([pinned]):hover .tab-icon-stack,
.tabbrowser-tab:not([pinned]):hover .tab-throbber,
.tab-close-button {
  display: none;
}

This explanation in a Reddit thread helped me figure out what to change (tl;dr -moz-box-ordinal-group and -moz-box have been replaced with standard flexbox css)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment