Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Докладніше

Ця тема закрита і перенесена в архів. Якщо вам потрібна допомога, запитайте.

How can I edit the userChrome.css to only show the icon and the close button for tabs that are neither selected nor hovered over?

  • 4 відповіді
  • 1 має цю проблему
  • 11 переглядів
  • Остання відповідь від Paul

How can I edit the userChrome.css to only show the icon and the close button for tabs that are neither selected nor hovered over? I still want the normal tab size to be displayed for the one / two tabs that are currently selected / hovered over like is default behaviour. I am basically looking for what is provideded on this github page, however with the closing icon and only for unselected tabs that I am not hovering over.

Thanks in advance

How can I edit the userChrome.css to only show the icon and the close button for tabs that are neither selected nor hovered over? I still want the normal tab size to be displayed for the one / two tabs that are currently selected / hovered over like is default behaviour. I am basically looking for what is provideded on [https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/icon_only_tabs.css this github page], however with the closing icon and only for unselected tabs that I am not hovering over. Thanks in advance

Усі відповіді (5)

You only want to show the label text on the currently selected tab and hide this text on all other tabs unless you hover a tab ?

Does this code work ?

.tabbrowser-tab .tab-text {display:none !important;}
.tabbrowser-tab:is([selected],[multiselected],:hover) .tab-text {display:unset !important;}

Змінено cor-el

Hmm, what is the purpose of having the close button on tabs only when you cannot hover them? I think that would make the buttons unusable because as soon as the mouse approaches, they would vanish.

@cor-el thanks for your response. The solution that you provided is mostly what I was looking for, only that the size of an unselected tab should be only icon and close button without all of the blank space in between.

Thanks in advance

WARNING from the moderator team: This script is not provided by Mozilla and is not officially supported. Firefox is a work in progress and, to allow for continuous innovation, Mozilla cannot guarantee future updates won’t impact your customizations. For this reason, Mozilla does not officially support style rules customization.

Please read Firefox Advanced Customization and Configuration Options to learn more.

This question has been locked because the original author has deleted their account. While you can no longer post new replies, the existing content remains available for reference.