92

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 a 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.

2

6 Answers 6

107
  1. Open your firefox "profile directory"
  1. Create directory chrome/ if it doesn't exist

  2. Create file chrome/userChrome.css inside if it doesn't exist.

  3. Add this text to the file:

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

  5. 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/


UPDATE 2022-10-24: Starting from Firefox-106.0, there is also a Tab Manager / Tab View that needs to be disabled. To disablet it, set browser.tabs.tabmanager.enabled to false

22
  • 11
    Here is a simpler way to open your profile directory: support.mozilla.org/en-US/kb/…
    – thSoft
    Commented Nov 19, 2017 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
    Commented Nov 19, 2017 at 19:00
  • 2
    @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.) Commented Nov 20, 2017 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/… Commented Mar 19, 2019 at 19:35
  • 2
    @SteveLandey Strange. I just upgraded to firefox 66.0, restarted the browser, and it still works. I'm using right what's written in the answer, #tabbrowser-tabs { visibility: collapse !important; } Did you try with the same code? P.S. I'm on ArchLinux, amd64. Commented Mar 20, 2019 at 9:19
16

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-of-type:last-of-type { display: none !important; }
4
  • 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
    Commented Mar 21, 2018 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
    Commented Mar 22, 2018 at 16:27
  • Indeed it does work once you remove the + button.
    – gioele
    Commented Mar 22, 2018 at 20:28
  • Alas no longer - there is also (at least on my distro?) a quit button on the far right of the tab bar - it is the last remaining element that I cannot find out how to make go away (I can kill the entire bar permanently, but if I want it back when multiple tabs are open, that's not a good solution)
    – SRNissen
    Commented Oct 1, 2023 at 13:19
8

Add to <firefox-profile-dir>/chrome/userChrome.css

#TabsToolbar {
    visibility: collapse;
}

#titlebar {
    margin-bottom: -22px !important;
}

#titlebar-buttonbox {
    height: 0px !important;
}

#nav-bar {
    margin-right: 0px;
}

#main-window[sizemode="maximized"] #nav-bar {
    margin-right: 0px;
}

Works on Firefox 70.0 but the _ □ X are missing.

Update: Works on Firefox 97 too.

1
  • 1
    If someone does not understand this, hiding the title bar still leaves you with the blank bar space at the top with navigation buttons like minimize, maximize, and close. This config tells Firefox to set the height of the box for those buttons to 0 pixels (disappearing them) and sets the navigation bar margin to 0 pixels hiding that. Commented Oct 12, 2022 at 16:18
7

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.

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.

1

If you're on macOS these solutions may hide the traffic light window buttons. One way to bring them back is to enable the title bar via View > Toolbars > Customize Toolbar… and toggling Title Bar in the bottom left corner.

Screenshot of title bar setting

Alternatively, you can use this CSS rule in userChrome.css to only hide the tabs and not the window buttons:

#TabsToolbar {
    .toolbar-items, .titlebar-spacer {
        display: none;
    }
}

/* Move private browsing indicator back to right now that tabs are hidden. */
#private-browsing-indicator-with-label {
    flex-grow: 1;
    justify-content: right;
    margin-inline: 0 !important;

    > label { 
        margin-inline-end: 0 !important;
    }
}

You may need to adjust the padding a bit to make it consistent with other windows, e.g.:

#TabsToolbar {
    padding: 6px 7px 5px 7px !important;

    .titlebar-buttonbox {
        margin-inline: 0 !important;
    }
}

These rules can be previewed with the Browser Toolbox under Tools > Browser Tools > Browser Toolbox. Open the Style Editor pane and make a new style sheet on the top left to apply user chrome styles without restarting Firefox.

The browser DOM can also be shown by navigating to:

view-source:chrome://browser/content/browser.xhtml

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .