7/21/2023 Styling firefox tabs

First install Firefox extension Tree Style Tab

Then enable toolkit.legacyUserProfileCustomizations.stylesheets in about:config.

Then access about:support > Profile Directory (Help > More TroubleShooting Information)

vim ${PROFILE_DIR}/chrome/userChrome.css
/* hides the native tabs */
#TabsToolbar {
  visibility: collapse;
}

/* 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: 40px;
  --wide-tab-width: 40px;
}

#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] {
  position: relative !important;
  /* transition: all 200ms !important; */
  min-width: var(--thin-tab-width) !important;
  max-width: var(--thin-tab-width) !important;
}

#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"]:hover {
    /* transition: all 200ms !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;
}

Restart Firefox and you're done.

In settings you can disable the tree functionnality in

Extension settings > Development > All configs

Source :

https://medium.com/@Aenon/firefox-hide-native-tabs-and-titlebar-f0b00bdbb88b

https://gist.github.com/olmstadfm/d6b4d37219e957d9cdcdb3ec88952c15

https://www.g2.com/discussions/45445-how-can-i-prevent-tree-style-tabs-from-opening-tabs-under-parent-tabs