Skip to content

Instantly share code, notes, and snippets.

@autonome
Created June 10, 2024 09:08
Show Gist options
  • Save autonome/e8aabfbb592ac0ff9ce611142e5b59b6 to your computer and use it in GitHub Desktop.
Save autonome/e8aabfbb592ac0ff9ce611142e5b59b6 to your computer and use it in GitHub Desktop.
Firefox userChrome.css for showing tab close button on hover, even tho tab is inactive
/* move favicon, throbber and text to the right so that the close button appears on the left */
.tabbrowser-tab .tab-icon-image {
-moz-box-ordinal-group: 2 !important;
}
.tabbrowser-tab .tab-throbber {
-moz-box-ordinal-group: 2 !important;
}
.tabbrowser-tab .tab-label {
-moz-box-ordinal-group: 3 !important;
}
/* hide close button initially */
.tabbrowser-tab .tab-close-button {
display: none !important;
}
/* show close + hide throbber & favicon on hover */
.tabbrowser-tab:hover .tab-close-button {
display: block !important;
}
.tabbrowser-tab:hover .tab-icon-image {
display: none !important;
}
.tabbrowser-tab:hover .tab-throbber {
display: none !important;
}
/* app tabs should not behave like regular tabs, so let them stay normal (viz. don't show close on hover) */
.tabbrowser-tab[pinned]:hover .tab-close-button {
display: none !important;
}
.tabbrowser-tab[pinned]:hover .tab-icon-image {
display: block !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment