Fly, Penguin!

I blog so I don't forget.

Firefox close tab buttons on mouse hover

1 minute read #firefox

I used to have Firefox’s TabMix Plus addon installed. And the feature I missed most - surprisingly - is to have the “close tab” buttons appear on a tab when you hover the mouse over it.

Googling a little bit told me how to bring it back:

UPDATE 2022-06-20

Well, this works today:

/* show close button on hover */
#tabbrowser-tabs[closebuttons="activetab"]
  .tabbrowser-tab:not([selected]):not([pinned]):hover
  .tab-close-button {
  display: -moz-inline-box !important;
}

/* make the close button more clearly visible on hover */
.tab-close-button:hover {
  background-color: rgba(255, 0, 0, 0.7) !important;
  fill: white !important;
}

Source:

Note: Explicitly not working is this original answer on the Mozilla support forums.

Original content

.tabbrowser-tab:not([selected]):not([pinned]) .tab-close-button {
    visibility: hidden !important;
    margin-left: -16px !important;
}
.tabbrowser-tab:not([selected]):not([pinned]):hover .tab-close-button {
    visibility: visible !important;
    margin-left: 0px    !important;
    display: -moz-box   !important;
}