52

How to hide/disable/remove the tab bar in Firefox 57+ ("Quantum")?

The goal is to just hide the tab bar totally. Useful if paired with extensions like "Tree Style Tab".

Note: there is similarly looking question here: Firefox hide everything except content area of the browser but it is not properly split into logically independent tasks. Also, it's outdated.

59
  1. Open your firefox "profile directory"
  2. Create directory chrome/ if it doesn't exist
  3. Create file chrome/userChrome.css inside if it doesn't exist.
  4. Add this text to the file:

    #TabsToolbar { visibility: collapse !important; }
    
  5. Ensure the config toolkit.legacyUserProfileCustomizations.stylesheets is set to true (required for Firefox69+, the stable version since September 2019), see this tutorial.

  6. Save the file and reload firefox. You should see no tab bar anymore.

P.S. Solution partly taken from here: https://www.ghacks.net/2017/09/27/tree-style-tab-is-a-webextension-now/

  • 9
    Here is a simpler way to open your profile directory: support.mozilla.org/en-US/kb/… – thSoft Nov 19 '17 at 18:20
  • This looks a little ugly, where did you find the DOM layout (how did you know to use #tabbrowser-tabs)? On OSX I think this needs a min-height (or something) i.imgur.com/oJOinx4.png – hayd Nov 19 '17 at 19:00
  • Setting #TabsToolbar { height: 40px; } seems to do the trick, it seems to not matter what height I put in there, so something weird is going on. Note: I found the ids here. – hayd Nov 19 '17 at 19:08
  • 1
    @hayd thanks for your comments! I tried your solution on Linux, but it didn't work. This works though: #TabsToolbar { visibility: collapse !important; } Can you test this code on your OS to see if it works? (It would be good to find a common solution that works on any OS.) – VasyaNovikov Nov 20 '17 at 13:24
  • 1
    The CSS selectors changed again in Firefox 66. Here's new CSS that works great on macOS: gist.github.com/stevelandeyasana/… – Steve Landey Mar 19 at 19:35
8

Unfortunately, that particular UI customization is not currently possible via Firefox Quantum's supported add-on APIs; a proper solution will be possible once Bug 1332447 is resolved.

Until then, VasyaNovikov's tweak to userChrome.css works, though editing that file is definitely an at-your-own-risk, not-officially-supported option.

8

I want the tab bar to auto hide when there's 1 tab and appear when there's multiple. Not the same as the question but this is about the only Google result right now for 57+ so for those who need it in userChrome.css

#tabbrowser-tabs, #tabbrowser-tabs arrowscrollbox { min-height: 0 !important; }
#tabbrowser-tabs tab { height: var(--tab-min-height); }
#tabbrowser-tabs tab:first-child:last-child { display: none !important; }
  • In Firefox 59 this userChrome.css does not work properly: the last tab is hidden, but the + button is still visible and thus the whole tab region is displayed. – gioele Mar 21 '18 at 20:58
  • 2
    @gioele It should work if you go to Customize Firefox and drag the new tab button out of the tab bar, it can be placed in the main toolbar or menu. If you really want it there I haven't tried that because I don't use that button, but if anyone comes up with it I can edit the answer. – aaron-bru Mar 22 '18 at 16:27
  • Indeed it does work once you remove the + button. – gioele Mar 22 '18 at 20:28
1

I distilled VasyaNovikov's answer into a gist to run on my Linux and OS X boxen, hopefully it helps anyone else out there with several personal machines. I want to also point out that after applying his answer, the back button will sit underneath the close button in OS X. The fix is to insert three flexible spaces into the toolbar (right-click on toolbar, select Customize..., then insert three spaces so the back button moves to the right).

If someone has the right CSS to insert into userChrome.css to accomplish the equivalent effect upon the back button, then that would be greatly appreciated.

protected by Community Dec 1 '17 at 22:18

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.