Skip to content

Instantly share code, notes, and snippets.

@morrolinux
Last active November 12, 2025 06:37
Show Gist options
  • Select an option

  • Save morrolinux/87aa37396432ea5d14a9220bc4892100 to your computer and use it in GitHub Desktop.

Select an option

Save morrolinux/87aa37396432ea5d14a9220bc4892100 to your computer and use it in GitHub Desktop.
FIrefox - Vertical tab bar with auto hide

What to expect

Graphical aspect may vary depending on your choices in following the instructions below, but the end result should look something like this:

immagine

Enable Firefox features

Go to about:config and set all of the following to true:

    toolkit.legacyUserProfileCustomizations.stylesheets
    layers.acceleration.force-enabled
    gfx.webrender.all
    gfx.webrender.enabled
    layout.css.backdrop-filter.enabled
    svg.context-properties.content.enabled
    
    # LINUX ONLY - WORKAROUND FOR BAR HIDING ON DRAG EVENT
    widget.gtk.ignore-bogus-leave-notify = 1

Write your userChrome.css

  1. Find your Firefox profile folder (about:support --> "Profile Directory")
  2. Create a folder named chrome inside it.
  3. Create a file named userChrome.css inside the chrome folder you just created.
  4. Paste in userChrome.css whatever you like from above
  5. Restart Firefox for changes to take effect. If nothing changes, try going to about:profiles and click the "Restart Normally" button in the upper right portion of the screen. Thanks @kr1s7ian for pointing this out.

To hide the "classic" horizontal tab toolar entirely

Paste this in your userChrome.css:

#TabsToolbar
{
    visibility: collapse;
}

To decrease the size of the sidebar header

Paste this in your userChrome.css:


/**
 * Decrease size of the sidebar header
 */
#sidebar-header {
  font-size: 1.2em !important;
  padding: 2px 6px 2px 3px !important;
}
#sidebar-header #sidebar-close {
  padding: 3px !important;
}
#sidebar-header #sidebar-close .toolbarbutton-icon {
  width: 14px !important;
  height: 14px !important;
  opacity: 0.6 !important;
}

To remove the sidebar header entirely

Paste this in your userChrome.css:

#sidebar-header {
  display: none;
}

To auto-hide the tab sidebar

Paste this in your userChrome.css:

#sidebar-header {
  /* display: none; */
  visibility: collapse !important;
}

/* Hide splitter */
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] + #sidebar-splitter {
  display: none !important;
}

/* Shrink sidebar until hovered */
:root {
  --thin-tab-width: 32px;
  --wide-tab-width: 300px;
}
#sidebar-box:not([sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]) {
  min-width: var(--wide-tab-width) !important;
  max-width: none !important;
}
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] {
  overflow: hidden !important;
  position: relative !important;
  transition: all 300ms !important;
  /*transition: all 0ms 0s !important;*/
  min-width: var(--thin-tab-width) !important;
  max-width: var(--thin-tab-width) !important;
  z-index: 2;
}
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:hover,
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] #sidebar {
  /*transition-delay: 0s !important;*/
  transition: all 300ms !important;
  min-width: var(--wide-tab-width) !important;
  max-width: var(--wide-tab-width) !important;
  z-index: 1;
}
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:hover {
  margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width)) * -1) !important;
}

To auto-hide the horizontal tab bar when the sidebar is active

Paste this in your userChrome.css:

#main-window #titlebar {
  overflow: hidden;
  transition: height 0.3s 0.3s !important;
}
/* Default state: Set initial height to enable animation */
/* #main-window #titlebar { height: 3em !important; } */
#main-window[uidensity="touch"] #titlebar { height: 3.35em !important; }
#main-window[uidensity="compact"] #titlebar { height: 2.7em !important; }
/* Hidden state: Hide native tabs strip */
#main-window[titlepreface*="XXX"] #titlebar { height: 0 !important; }
/* Hidden state: Fix z-index of active pinned tabs */
#main-window[titlepreface*="XXX"] #tabbrowser-tabs { z-index: 0 !important; }

And then go to Sidebery settings > General > Preface value, enable it and set it to XXX.

Now You also need to remove indent when the bar is collapsed, or you won't be able to see all tabs

Go to SideBery settings --> Styles editor and add:

#root:not(:hover){
  --tabs-indent: 0;
}

EXTRA: Window close button

Credits: AndryGabry on my Patreon and @XargonWan here on github.

If you need the "window close" button, you can add it to your address bar.

  1. Comment out this line:
/* Hidden state: Hide native tabs strip */
/*#main-window[titlepreface*="XXX"] #titlebar { height: 0 !important; }*/
  1. Add the following:
/*Reference https://www.userchrome.org/*/
/* Hide title bar but keep window controls (minimize, maximize, close) */
/*Hide tabs and other things inside the titlebar, except window buttons*/
#main-window[titlepreface*="XXX"] .tabbrowser-tab{  display: none !important; }
#main-window[titlepreface*="XXX"] .scrollbox-clip{  width: 0 !important; }
#main-window[titlepreface*="XXX"] #alltabs-button{  display: none !important; }
#main-window[titlepreface*="XXX"] .toolbar-items{  display: none !important; }
/*Make sure that the titlebar and navbar are both on the same line*/
#main-window[titlepreface*="XXX"] #navigator-toolbox{  display: flex !important; box-sizing: border-box; justify-content:space-between; flex-direction: row-reverse;   flex-wrap: wrap; }
#main-window[titlepreface*="XXX"] .titlebar-spacer{  display: none !important; }
#main-window[titlepreface*="XXX"] #nav-bar{border-radius: 5px 0 0 0; display: flex; box-sizing: border-box; padding-top: 2px; align-items: center; flex: 1; flex-basis: 50%; width: 100% !important; }
/* on GNOME you can use max-width: 48px below, if you only have the "Close" button on windows (default) */
#main-window[titlepreface*="XXX"] #titlebar{border-radius: 0 5px 0 0; border-left: none !important; margin-top: 1px; flex: 1; flex-basis: 50%; width:10% !important; display: flex; max-width: 100px;   align-items: center;background-color: var(--toolbar-bgcolor) !important; border-left: 1px solid var(--toolbar-color);}
#main-window[titlepreface*="XXX"] #titlebar:-moz-window-inactive{opacity: 1 !important;}
#main-window[titlepreface*="XXX"] #TabsToolbar > *:not(.titlebar-buttonbox-container) {display: none !important;}
#PersonalToolbar {width: 100% !important; }
#tab-notification-deck {width: 100% !important;   flex-basis: 100%; width: 100% !important;}
@LeonardoBeleffi
Copy link

@Lautz97 I don't know if this will help, but I've been having the very same issue for every Firefox update in the lasts 6 months or so.
The way I solve it now, is just to pkill firefox, then i open firefox again and (if it is not done by default) you can open everything back with CTRL-SHIFT-T. This is fixing the issue every time for me

@Lautz97
Copy link

Lautz97 commented Jun 25, 2025

killing the process does not work, also i'm on a win machine. for now i just set the normal width to the hovering one and it is usable,

@Raideeen
Copy link

Raideeen commented Jul 1, 2025

Hey guys, I've modified the userChrome.css quite a lot. Here's an updated version that works for firefox version 140+.
I inspired myself from this repo.

media (prefers-color-scheme:dark) {
   :root {
      --bg: #1a1b26;

      --urlbar-bg: #0d0d15;
      --urlbar-border-top: #000;
      --urldrop-bg: #0d0d15;
      --urlbar-border-bottom: #404040;
      --urlbar-height: 30px;
      --urlbar-outline: #414868;

      --fullscreen-warn: rgb(25, 25, 25);

      --arrowpanel-background: var(--urlbar-bg) !important;
      --button-hover-bgcolor: rgba(159, 159, 159, 0.35) !important;
      --button-active-bgcolor: rgba(255, 255, 255, .2) !important;
      --button-bgcolor: rgba(117, 117, 117, 0.9) !important;
      --toolbarbutton-icon-fill-opacity: 0.8 !important;
      --arrowpanel-border-color: rgb(55, 55, 55) !important;
      --identity-btn-hover-color: rgba(117, 117, 117) !important;

      --dark-menu-background-color: rgba(34, 34, 36, .5) !important;
      --dark-menu-border-color: rgb(55, 55, 55) !important;
      --dark-menuitem-hover-background-color: rgba(159, 159, 159, 0.35) !important;
   }
}

@media (prefers-color-scheme:light) {
   :root {
      --bg: #f1f5f9;

      --urlbar-bg: #cbd5e1;
      --urlbar-border-top: #9ca3af;
      --urlbar-border-bottom: #fff;
      --urldrop-bg: #cbd5e1;
      --urlbar-outline: #94a3b8;

      --fullscreen-warn: rgb(25, 25, 25);

      --arrowpanel-background: #e2e8f0 !important;
      --button-hover-bgcolor: #9699a3 !important;
      --button-hover-bgcolor: #cbd5e1 !important;
      --button-active-bgcolor: #cbd5e1 !important;
      --identity-btn-hover-color: white !important;
   }
}

/* Suppress Connecting/Waiting/Reading/Transerring */
/* #statuspanel[type="status"] {
   display: none !important;
 } */
/* Suppress Link Destination Overlay */
/* #statuspanel[type="overLink"] {
   display: none !important;
 } */

/* URL BAR */
#urlbar {
   border-radius: 30px !important;
   border: 0 !important;
}

#urlbar:not(.megabar):not([focused="true"]):hover {
   outline: 1px solid var(--urlbar-outline) !important;
}

#urlbar[focused="true"] {
   border: 0 !important;
   border-top: 1px solid var(--urlbar-border-top) !important;
   border-bottom: 1px solid var(--urlbar-border-bottom) !important;
   border-radius: 30px !important;
}

#urlbar[breakout][breakout-extend] {
   border: none !important;
   box-shadow: rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px,
      rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px,
      rgba(0, 0, 0, 0.09) 0px 32px 16px !important;
   top: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2) !important;
   left: 0 !important;
   width: 100% !important;
}

#urlbar-container {
   margin-bottom: 3px;
   display: initial;
}

#urlbar-background {
   box-shadow: none !important;
   border-radius: 30px !important;
   background: var(--urlbar-bg) !important;
}

#urlbar[focused="true"] #urlbar-background {
   box-shadow: inset 1px 1px 1px 0px rgba(0, 0, 0, 0.35) !important;
   outline: none !important;
}

#wrapper-urlbar-container #urlbar {
   height: var(--urlbar-height) !important;
}

/* Active Address/Search Field Dropdown */
#urlbar[breakout][breakout-extend]>#urlbar-background {
   outline: none !important;
   box-shadow: none !important;
   background: var(--urldrop-bg) !important;
   border-radius: 15px !important;
}

#urlbar[breakout][breakout-extend]>#urlbar-input-container,
#urlbar-input-container {
   height: var(--urlbar-height) !important;
   padding-block: 0px !important;
   padding-inline: 0px !important;
   transition: none !important;
}

/* Idendity icon button */
#identity-icon-box.identity-box-button {
   margin: 3px 0 3px 3px;
   border-radius: 14px !important;
   background-color: var(--bg) !important;
   opacity: 0.8
}

#identity-icon-box.identity-box-button:hover {
   cursor: pointer;
   background-color: var(--identity-btn-hover-color) !important;
}

/* Track protection icon */
#tracking-protection-icon-container {
   border-radius: 16px !important;
}

#tracking-protection-icon-container:hover {
   cursor: pointer !important;
}

/* Star button */
#star-button-box {
   border-radius: 16px !important;
}

#star-button-box {
   cursor: pointer !important;
}

/* | Borders | */

.tabbrowser-tab::after {
   border: 0 !important;
}

.titlebar-spacer[type="pre-tabs"] {
   border: 0 !important;
}

#navigator-toolbox {
   border: 1 !important;
}

.titlebar-spacer[type="pre-tabs"] {
   border: 0 !important;
}

.tabbrowser-tab::after {
   border: 0 !important;
}

#urlbar-background {
   border: 0 !important;
}

#urlbar[open]>.urlbarView>.urlbarView-body-outer>.urlbarView-body-inner {
   border-top: 0 !important;
}


/* Active Tab */
:root:not([lwt-default-theme-in-dark-mode]) .tab-background[selected],
.tab-background[multiselected="true"] {
   background: rgba(0, 0, 0, .05) !important;
}

:root[lwt-default-theme-in-dark-mode] .tab-background[selected],
.tab-background[multiselected="true"] {
   background: rgba(0, 0, 0, .2) !important;
}


/* Navigation Bar */
#nav-bar {
   background-color: var(--bg) !important;
}

/* Bookmarks Bar */
#PersonalToolbar {
   background-color: var(--bg) !important;
}

/* Navigation Bar Separator */
#navigator-toolbox {
   border-color: var(--bg) !important;
}

/* Navigation bar Buttons */
toolbarbutton:hover {
   cursor: pointer;
}

/* Show Tab close button on hover */
.tabbrowser-tab:not([pinned]) .tab-close-button {
   display: -moz-box !important;
   opacity: 0;
   visibility: collapse !important;
   transition: opacity 0.25s, visibility 0.25s ease-in !important;
}

.tabbrowser-tab:not([pinned]):hover .tab-close-button {
   opacity: 1;
   visibility: visible !important;
   border-radius: 3px 3px 3px 3px !important;
}

/* Show URL buttons on Hover */
#nav-bar:not([customizing="true"])>#nav-bar-customization-target>#urlbar-container:not(:hover)>#urlbar:not([focused])>#urlbar-input-container>#page-action-buttons {
   opacity: 0;
}

#page-action-buttons {
   transition: opacity 0.15s ease;
}

#nav-bar:not([customizing="true"])>#nav-bar-customization-target>#urlbar-container:not(:hover)>#urlbar:not([focused])>#urlbar-input-container>#tracking-protection-icon-container {
   opacity: 0;
}

#tracking-protection-icon-container {
   transition: opacity 0.15s ease;
}


/*Full Screen Warning*/

#fullscreen-warning {
   background-color: var(--fullscreen-warn) !important;
   border-color: var(--fullscreen-warn) !important;
   max-width: 500px !important;
   max-height: 50px !important;
   border-radius: 50px !important;
   font-size: 12px !important;
   opacity: 0.8 !important;
}

.pointerlockfswarning-generic-text,
.pointerlockfswarning-domain-text {
   font-size: 15px !important;
   color: rgb(255, 255, 255) !important;
   text-shadow: none !important;
}


/* Hide tabs bar for Tree style tabs (Credit u/jfgxyz on Reddit) */
toolbar#TabsToolbar {
   height: 0px;
   min-height: 0 !important;
   background-color: var(--bg) !important;
}

.toolbar-items {
   visibility: collapse;
}

/* FIXED: Only hide native Firefox tabs, not Sidebery tabs */
/* Only target native Firefox tab elements in the tab bar, not sidebar tabs */
#TabsToolbar .tab[selected="true"] {
   visibility: collapse;
   height: 0px;
}

#TabsToolbar .tabbrowser-tab {
   visibility: collapse;
   height: 0px;
}

#TabsToolbar .tabbrowser-tab[visuallyselected="true"] {
   visibility: collapse;
   height: 0px;
}

/* ----- Move menu buttons ----- */
/* :root {
   --toolbar-start-end-padding: 2px !important; 
} */

#nav-bar #PanelUI-button {
   -moz-box-ordinal-group: 0 !important;
}

#nav-bar #PanelUI-button #PanelUI-menu-button {
   margin-right: 2px !important;
   margin-left: 2px !important;
}

/* toolbar:not([customizing]) > #nav-bar-overflow-button {
   -moz-box-ordinal-group: 1 !important;
}

toolbar:not([customizing]) > #nav-bar-customization-target {
   -moz-box-ordinal-group: 2 !important;
} */

/* ----- Close/min/max fix ----- */
/* Fix popup position */
#appMenu-popup {
   margin-inline: -244px !important;
}

#nav-bar {
   padding-left: 0px !important;
   padding-right: 118px !important;
   position: static !important;
}

#navigator-toolbox:not([inFullscreen]) #TabsToolbar .titlebar-buttonbox-container {
   visibility: visible !important;
   display: block !important;
   position: absolute !important;
   top: 1px !important;
   left: unset !important;
   right: 0 !important;
}

#TabsToolbar .titlebar-min {
   -moz-box-ordinal-group: 0 !important;
}

#TabsToolbar .titlebar-max,
.titlebar-restore {
   -moz-box-ordinal-group: 1 !important;
}

#TabsToolbar .titlebar-close {
   -moz-box-ordinal-group: 2 !important;
}

#navigator-toolbox[inFullscreen] #navigator-toolbox #TabsToolbar .titlebar-buttonbox-container {
   -moz-box-ordinal-group: 1 !important;
}

#navigator-toolbox #TabsToolbar .titlebar-buttonbox-container {
   -moz-box-ordinal-group: 1 !important;
}

@media only screen and (max-width: 670px) {
   #main-window #navigator-toolbox:not([inFullscreen]) #TabsToolbar .titlebar-buttonbox-container {
      visibility: visible !important;
      position: relative !important;
      display: block !important;
   }

   #main-window #navigator-toolbox:not([inFullscreen]) #nav-bar {
      padding-right: initial !important;
   }

   #TabsToolbar.browser-toolbar {
      display: flex !important;
      justify-content: flex-end !important;
   }

}

#toolbar-menubar {
   /* menubar bg color */
   background-color: var(--bg) !important;
}


/* Line up the Windows controls with the rest of the icons in the toolbar. */
:root:not([sizemode="maximized"]) .titlebar-buttonbox-container {
   padding-top: 3px;
}

.titlebar-buttonbox {
   z-index: 3 !important;
   padding-right: 3px;
}

.titlebar-buttonbox * {
   border-radius: 5px;
   width: 35px;
   height: 38px;
}

/* SIDEBERY - FIXED VERSION */

/* hides the sidebar header */
#sidebar-header {
   display: none;
}

/* FIXED AUTO HIDE SIDE BAR */
#sidebar-box {
   --uc-sidebar-width: 44px;
   --uc-sidebar-hover-width: 260px;
   --uc-autohide-sidebar-delay: 1ms;
   --uc-autohide-transition-duration: 115ms;
   --uc-autohide-transition-type: linear;
   
   position: relative;
   min-width: var(--uc-sidebar-width) !important;
   width: var(--uc-sidebar-width) !important;
   max-width: var(--uc-sidebar-width) !important;
   z-index: 100;
   background-color: inherit;
}

#sidebar-box[positionend] {
   direction: rtl;
}

#sidebar-box[positionend]>* {
   direction: ltr;
}

#sidebar-box[positionend]:-moz-locale-dir(rtl) {
   direction: ltr;
}

#sidebar-box[positionend]:-moz-locale-dir(rtl)>* {
   direction: rtl;
}

/* HIDE SIDE BAR IN FULL SCREEN */
#main-window[inFullscreen="true"] #sidebar-box {
   --uc-sidebar-width: 0px;
}

#sidebar-splitter {
   display: none;
}

#sidebar-header {
   overflow: hidden;
   color: var(--bg) !important;
}

/* FIXED: Better sidebar browser stack support */
.sidebar-browser-stack {
   background: inherit;
}

#sidebar-header,
#sidebar {
   transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
   min-width: var(--uc-sidebar-width) !important;
   will-change: min-width;
}

/* FIXED: Better hover targeting including browser stack */
#sidebar-box:hover > #sidebar-header,
#sidebar-box:hover > #sidebar,
#sidebar-box:hover > .sidebar-browser-stack > #sidebar {
   min-width: var(--uc-sidebar-hover-width) !important;
   transition-delay: 0ms !important;
}

.sidebar-panel {
   background-color: transparent !important;
   color: var(--newtab-text-primary-color) !important;
}

.sidebar-panel #search-box {
   -moz-appearance: none !important;
   background-color: rgba(249, 249, 250, 0.1) !important;
   color: inherit !important;
}

/* Add sidebar divider and give it background */
#sidebar,
#sidebar-header {
   background-color: inherit !important;
   /* 	border-inline: 1px solid rgb(80, 80, 80); */
   border-inline-width: 0px 1px;
}

#sidebar-box:not([positionend])> :-moz-locale-dir(rtl),
#sidebar-box[positionend]>* {
   border-inline-width: 1px 0px;
}

/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
#sidebar-box:not([positionend]):hover~#appcontent #statuspanel {
   inset-inline: auto 0px !important;
}

#sidebar-box:not([positionend]):hover~#appcontent #statuspanel-label {
   margin-inline: 0px !important;
   border-left-style: solid !important;
}

@basteez
Copy link

basteez commented Jul 24, 2025

Had issues with hovering on macOS, fixed this way in my userChrome.css

#TabsToolbar {
  display: none !important;
}

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

#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] + #sidebar-splitter {
  display: none !important;
}

:root {
  --thin-tab-width: 48px;
  --wide-tab-width: 300px;
}

#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] {
  transition: all 0.3s ease-in-out !important;
  min-width: var(--thin-tab-width) !important;
  max-width: var(--thin-tab-width) !important;
  overflow: hidden !important;
  position: relative !important;
}


#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:hover {
  min-width: var(--wide-tab-width) !important;
  max-width: var(--wide-tab-width) !important;
  z-index: 1000;
}

@davidino
Copy link

davidino commented Aug 5, 2025

Had issues with hovering on macOS, fixed this way in my userChrome.css

I had the same issue, and fixed it with the same code. Thanks. Appreciated

@fragrusti
Copy link

Had issues with hovering on macOS, fixed this way in my userChrome.css

I had the same issue, and fixed it with the same code. Thanks. Appreciated

Me too.

PS: Non ci posso credere Daviddd ma qua su Github sul repo di Morro ci dovevamo ribeccare!! ahahahah

@davidino
Copy link

davidino commented Aug 5, 2025

@fragrusti mitico :D una carrambata!

@fabioul0us
Copy link

Hi, maybe could be useful to someone. I did a shorter css but very efficient

#sidebar-header {
  /* display: none; */
  visibility: collapse !important;
}

#sidebar-box,
#sidebar-main {
  min-width: 35px !important;
  max-width: 35px !important;
  transition: width 0.2s ease !important;
  z-index: 999 !important;
  background-color: var(--toolbar-bgcolor) !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Mouse expansion */
#sidebar-box:hover,
#sidebar-main:hover {
  width: 220px !important;
  min-width: 220px !important;
  max-width: 220px !important;
}

/* Hide the top tabs */
#TabsToolbar {
  visibility: collapse !important;
 }
 
 /* Hide top bookmarks */
#PersonalToolbar {
  visibility: collapse !important;
 }

this fixed it all for me, beautiful!

@pacaldi
Copy link

pacaldi commented Oct 20, 2025

@Raideeen thanks for you work, great! I need to edit some features please, for example when the sidebery autohide the icons fixed ont top scales vertically, i want to remain orizzontal. Is all commented clearly in the CSS, because i don't find it...
Thnak you so much

@pacaldi
Copy link

pacaldi commented Oct 23, 2025

@Raideeen sorry i find the solution here

@Raideeen
Copy link

No worries mate @pacaldi. Couldn't do anything this week because it was during my workdays :)

@CristianRossiSorint
Copy link

My better version:

/* Nascondi l'intera barra delle schede */
#TabsToolbar {
  visibility: collapse !important;
  height: 0 !important;
  min-height: 0 !important;
}

/* Nascondi l'intera barra del titolo */
#titlebar {
  visibility: collapse !important;
  height: 0 !important;
  min-height: 0 !important;
}

/* Rimuovi header della sidebar */
#sidebar-header {
  visibility: collapse !important;
}

/* Nascondi lo splitter tra sidebar e contenuto */
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]
  + #sidebar-splitter {
  display: none !important;
}

/*************************************************************
 * Effetto sidebar “slim” con espansione al passaggio del mouse
 *************************************************************/

:root {
  --thin-tab-width: 32px; /* Larghezza chiusa */
  --wide-tab-width: 300px; /* Larghezza aperta */
}

/* Sidebar normale (non Sidebery) */
#sidebar-box:not([sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]) {
  min-width: var(--wide-tab-width) !important;
  max-width: none !important;
}

/* Sidebar Sidebery - ridotta di default */
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"] {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  height: 100% !important;
  min-width: var(--thin-tab-width) !important;
  max-width: var(--thin-tab-width) !importaNT;
  transition: max-width 250ms ease-in-out, min-width 250ms ease-in-out !important;
  overflow: hidden !important;
  background-color: var(--toolbar-bgcolor) !important;
  border-right: 1px solid color-mix(in srgb, var(--toolbar-color) 20%, transparent);
  z-index: 3 !important;
}

/* Sidebar Sidebery - espansa quando hoverata */
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:hover {
  min-width: var(--wide-tab-width) !important;
  max-width: var(--wide-tab-width) !important;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.2);
}

/* Impedisce che il contenuto della sidebar sbordi durante la transizione */
#sidebar {
  overflow: hidden !important;
}

/* Contenuto della pagina a destra della sidebar */
#browser {
  position: relative !important;
  margin-left: var(--thin-tab-width) !important;
  transition: margin-left 250ms ease-in-out !important;
  z-index: 1 !important;
}

/* Quando la sidebar è hoverata, sposta leggermente il contenuto per allinearlo */
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"]:hover ~ #browser {
  margin-left: var(--wide-tab-width) !important;
}

/* Mantieni toolbar sopra tutto */
#navigator-toolbox,
#PersonalToolbar {
  position: relative !important;
  z-index: 4 !important;
  background-color: var(--toolbar-bgcolor) !important;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment