How to hide tab bar (tabstrip) in Firefox 57+ Quantum

61

23

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.

VasyaNovikov

Posted 2017-11-15T21:07:49.403

Reputation: 2 329

For OP information, I have added a new answer in the linked question that use userChrome.css but with different element name and ID.

– None – 2017-11-19T20:48:40.343

Here's you can get the dev tools to find element ids and test styles live: https://www.reddit.com/r/FirefoxCSS/comments/73dvty/tutorial_how_to_create_and_livedebug_userchromecss/

– Tim Abell – 2019-09-11T13:09:36.807

Answers

66

  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/

VasyaNovikov

Posted 2017-11-15T21:07:49.403

Reputation: 2 329

9

Here is a simpler way to open your profile directory: https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile

– thSoft – 2017-11-19T18:20:14.263

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) https://i.imgur.com/oJOinx4.png

– hayd – 2017-11-19T19:00:20.800

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 – 2017-11-19T19:08:51.227

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 – 2017-11-20T13:24:31.180

@VasyaNovikov sorry to be unclear, but mine was to add both css. – hayd – 2017-11-21T00:16:33.467

@hayd does it work with only one (that I wrote above)? (I've also updated the answer already.) – VasyaNovikov – 2017-11-21T07:40:43.763

@thSoft I've included your remark into the answer if you don't mind. Thanks! – VasyaNovikov – 2017-11-21T11:54:25.040

On MacOS I recommend adding this as well #nav-bar { padding-left: 80px; } – Joshua Kifer – 2018-10-05T17:27:13.090

1

The CSS selectors changed again in Firefox 66. Here's new CSS that works great on macOS: https://gist.github.com/stevelandeyasana/bd1a1fe0a1adea0ef9ffa90b31f09aa1

– Steve Landey – 2019-03-19T19:35:02.387

@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. – VasyaNovikov – 2019-03-20T09:19:58.080

On Windows with Firefox 68, the buttons for maximizing, closing, etc... disappear with just #TabsToolbar { visibility: collapse !important; }. It worked with a slight edit to @SteveLandey's gist: https://gist.github.com/Shywim/5128ff74402132a7988e53362481c705

– Matthieu Harlé – 2019-08-01T07:00:28.747

10

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; }

aaron-bru

Posted 2017-11-15T21:07:49.403

Reputation: 111

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 – 2018-03-21T20:58:11.873

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 – 2018-03-22T16:27:37.390

Indeed it does work once you remove the + button. – gioele – 2018-03-22T20:28:54.373

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.

Callahad

Posted 2017-11-15T21:07:49.403

Reputation: 181

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.

user821800

Posted 2017-11-15T21:07:49.403

Reputation: 11

1

Add to userChrome.css

#TabsToolbar {
    visibility: collapse;
}

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

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

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

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

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

lyuboslav kanev

Posted 2017-11-15T21:07:49.403

Reputation: 171