Skip to content

Instantly share code, notes, and snippets.

@soulhotel
Last active October 11, 2025 02:32
Show Gist options
  • Select an option

  • Save soulhotel/4f0e27beea58a981c3f7db099b0628a4 to your computer and use it in GitHub Desktop.

Select an option

Save soulhotel/4f0e27beea58a981c3f7db099b0628a4 to your computer and use it in GitHub Desktop.
Get and display the total # of tabs open in a given window (firefox css)
/* get count */
#tabbrowser-tabs {
counter-reset: tabcount;
& .tabbrowser-tab {
counter-increment: tabcount;
}
}
/* VERTICAL tabs visual indicator */
#tabbrowser-arrowscrollbox[orient="vertical"] {
#tabbrowser-arrowscrollbox-periphery::after {
content: counter(tabcount) " Tabs Open";
position: absolute;
bottom: -22px;
left: 20px;
word-spacing: 0.2rem;
font-style: italic;
}
}
/* adjustment for collapsed tabs */
#sidebar-main:not([sidebar-launcher-expanded=""]) {
#tabbrowser-arrowscrollbox[orient="vertical"] {
#tabbrowser-arrowscrollbox-periphery::after {
bottom: -36px;
left: 1px;
text-align: center;
}
}
}
/* adjustment for tabs overflow */
#tabbrowser-tabs[overflow=""] {
#tabbrowser-arrowscrollbox[orient="vertical"] {
#tabbrowser-arrowscrollbox-periphery::after {
position: fixed;
z-index: 99999999999999999;
bottom: 72px;
left: 104px;
}
}
}
/* HORIZONTAL tabs visual indicator */
#tabbrowser-arrowscrollbox[orient="horizontal"]::after {
content: counter(tabcount) " Tabs Open";
margin: 12px 10px !important;
}
@soulhotel
Copy link
Author

  • Updated to include a different approach for horizontal tabs by sifferedd
  • For just the number and no text, replace all instances of " Tabs Open" with ""

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