Tools
Expandable Vertical Tabs on Firefox
Fabian Jost
Fabian Jost
February 22, 2023
1 min
Make sure to subscribe to my newsletter and be the first to know the news.

Table Of Contents

01
Introduction
02
Install a Sidebar Tabs Extension
03
Disable Firefox Menu Bar
04
Enable Stylesheet Customization
05
Locate Profile Directory
Expandable Vertical Tabs on Firefox

Introduction

Microsoft Edges vertical tab feature is frankly speaking amazing and it is a shame we currently don’t have an equivalent implementation in firefox. The follwing guide shows you how to achieve it anyways.

Spoiler alert: It looks complicated, but is actually pretty easy.

Install a Sidebar Tabs Extension

First search for a firefox extension that displays tabs in the sidebar at https://addons.mozilla.org

The one I am using is called Tree Style Tab

Disable Firefox Menu Bar

  1. Right click on the menu bar
  2. Uncheck menu bar

Enable Stylesheet Customization

  1. Go to about:config
  2. Set the flag toolkit.legacyUserProfileCustomizations.stylesheets to true

Locate Profile Directory

  1. In firefox type about:support in the address line
  2. Search for the field Profile Directory
  3. Open this directory in your file explorer and create a folder named chrome
  4. Create a file named userChrome.css inside the chrome folder with the following content

your-profile-directory/chrome/userChrome.css

/***** Hide tab top bar *****/

.tabbrowser-tab {
  visibility: collapse;
}
.titlebar-button {
  height: 30px !important;
  margin-top: 5px !important;
  margin-bottom: 5px !important;
}
#nav-bar {
  margin-top: -40px;
  margin-right: 175px;
  box-shadow: none !important;
}

[uidensity="compact"]:root .titlebar-button {
  height: 32px !important;
}
[uidensity="compact"]:root #nav-bar {
  margin-top: -40px;
}

#titlebar-spacer {
  background-color: var(--chrome-secondary-background-color);
}
#titlebar-buttonbox-container {
  background-color: var(--chrome-secondary-background-color);
}
.titlebar-color {
  background-color: var(--toolbar-bgcolor);
}

#main-window[inFullscreen="true"] #sidebar-box,
#main-window[inFullscreen="true"] #sidebar-box + splitter {
    visibility: collapse;
}

#sidebar-header {
  display: none !important;
}


/***** Auto hide vertical tabs *****/

/* Hide main tabs toolbar */
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
    opacity: 0;
    pointer-events: none;
}
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
    visibility: collapse !important;
}

/* Sidebar min and max width removal */
#sidebar-box {
    max-width: none !important;
    min-width: 0px !important;
}
/* Hide splitter, when using Tree Style Tab. */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] + #sidebar-splitter {
    display: none !important;
}
/* Hide sidebar header, when using Tree Style Tab. */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
    visibility: collapse;
}

/* Shrink sidebar until hovered, when using Tree Style Tab. */
:root {
    --thin-tab-width: 12rem;
    --wide-tab-width: 24rem;
}
#sidebar-box:not([sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]) {
    min-width: var(--wide-tab-width) !important;
    max-width: none !important;
}
 
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] {
    position: absolute;
    z-index: 1;
    overflow: hidden;
    min-width: var(--thin-tab-width) !important;
    max-width: var(--thin-tab-width) !important;
    height: 100%;
    transition: all 200ms ease !important;
    
}
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]:hover {
    transition: all 200ms ease !important;
    min-width: var(--wide-tab-width) !important;
    max-width: var(--wide-tab-width) !important;
    margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width)) * -1) !important;
    z-index: 1;
}

#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] ~ #appcontent {
    margin-right: 0;
    margin-left: var(--thin-tab-width);
  }

/* Full screen */
#main-window[inFullscreen] #appcontent {
  margin-left: 0;
  margin-right: 0;
}

NOTE:
In the above code, you can adjust the values of the follwing three variables to whatever suits you best.

:root {
    --thin-tab-width: 12rem;
    --wide-tab-width: 24rem;
}

Now restart firefox and enjoy your vertical tabs!


Tags

tutorialsoftware
Fabian Jost

Fabian Jost

CEO of LYTE Vapes

I am the CEO of LYTE Vapes and I want to give something back to the people out there, things I wish I knew way earlier. Welcome to my blog.

Expertise

CEO LYTE Vapes
B.Sc. Mechatronics

Social Media

lytevapesinstagramlinkedinfacebooktwitter

Related Posts

Great Tools I Use Everyday
Great Tools I Use Everyday
March 21, 2021
1 min
© 2023, All Rights Reserved.
Made with    by
Webdesk Designs

Quick Links

About MeContact Me

Social Media