Skip to content

Instantly share code, notes, and snippets.

@morrolinux
Last active June 28, 2024 16:48
Show Gist options
  • Save morrolinux/87aa37396432ea5d14a9220bc4892100 to your computer and use it in GitHub Desktop.
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;}
@Milziade
Copy link

Milziade commented Jun 2, 2024

Have you removed or commented #main-window[titlepreface*="XXX"] #titlebar { height: 0 !important; }?

It seems I commented out the wrong line lol, now buttons show up, but there is still some problem with padding.
This is how it looks before messing up with userChrome.css:
firefox_normal
This is what I get after the addition of the "Window close" part:
firefox_update
The problem seems to be linked to the Bookmarks toolbar. When it's hidden, everything looks great, otherwise it gets bigger while the topbar (where icon/close buttons are) gets smaller.
Here you can find my userChrome.css, but I have no idea which parameter should I change to get rid of this behavior
https://pastebin.com/HGwRbdaC

@dj-var
Copy link

dj-var commented Jun 2, 2024

I would like to ask how can I increase the size of the text a bit and size of the tabs in the side bar please? They seem to be a little bit on the small side to be honest.
Also thinking for people with sight impairments. Thanks

@startmsn
Copy link

startmsn commented Jun 2, 2024

For long time time a have used the Firefox's Containers, there is a way to import the configuration to Sidebery Extention?

@cberg75
Copy link

cberg75 commented Jun 3, 2024

Thanks for the nice video and useful tips.
I still have problems with the minimize and close buttons in Windows.
I found a type in the code snippet:

#main-window[titlepreface*="XXX"]#TabsToolbar > *:not(.titlebar-buttonbox-csontainer) {display: none !important;}

csontainer instead of container.

But it is not enough to get the button back visible.
I also get a blank bar when disabling the sidebery extension.

@morrolinux
Copy link
Author

#main-window[titlepreface*="XXX"]#TabsToolbar > *:not(.titlebar-buttonbox-csontainer) {display: none !important;}

csontainer instead of container.

Thanks for pointing that out. What's the problem you're having, to be more specific?

@cberg75
Copy link

cberg75 commented Jun 3, 2024

Like other said, I have the space on the top right for the buttons, and I can see minimize, maximize or close with the right click, but no buttons.
And disabling the plugin, gim me an empty top bar.

@startmsn
Copy link

startmsn commented Jun 3, 2024

Thanks for the nice video and useful tips. I still have problems with the minimize and close buttons in Windows. I found a type in the code snippet:

#main-window[titlepreface*="XXX"]#TabsToolbar > *:not(.titlebar-buttonbox-csontainer) {display: none !important;}

csontainer instead of container.

But it is not enough to get the button back visible. I also get a blank bar when disabling the sidebery extension.

Hi, i had some issue, by setting-up all the some configurations ad corrections now in Windows pc all works fine.

  1. I advise you to hide the Bookmarks bar in settings of Firefox.

  2. Second set this Firefox settings on the search bar type: ----> about:config

toolkit.legacyUserProfileCustomizations.stylesheets -------> true
layers.acceleration.force-enabled -------> true
gfx.webrender.all -------> true
gfx.webrender.enabled -------> to be created by clicking on "+" con state "true"
layout.css.backdrop-filter.enabled -------> true
svg.context-properties.content.enabled -------> true

widget.gtk.ignore-bogus-leave-notify Only on Linux ----->Edit the value from 2 to 1

ui.key.menuAccessKeyFocuses ( The the solution for the Sidebery's shortcuts with Firefox's Shortcuts Only on Linux)

I set up my Firefox and the Sidebery as @morrolinux , i did all some because is awesome.

Here is: userChrome.css configuration:

`
#sidebar-header {
display: none;
}

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

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

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

/* Hidden state: Hide native tabs strip /
/#main-window[titlepreface
="XXX"] #titlebar { height: 0 !important; }/

/Reference https://www.userchrome.org/*/
/Hides 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; 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"]#TabsToolbar > *:not(.titlebar-buttonbox-csontainer) {display: none !important;}
#PersonalToolbar {width: 100% !important; flex-basis: 100%; width: 100% !important;}
#tab-notification-deck {width: 100% !important; flex-basis: 100%; width: 100% !important;}

`

@Nj0be
Copy link

Nj0be commented Jun 3, 2024

No, I mean this:

immagine

When the bookmark toolbar is enabled, it eats space from the upper part which will result cropped, instead of growing downwards.

I resolved this bug commenting this line:

/* Default state: Set initial height to enable animation */
/* #main-window #titlebar { height: 3em !important; } */

and modifying the last part of the css:

/*Reference https://www.userchrome.org/*/
/*Hides 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;}  

It works on arch linux using gnome

@theotrst
Copy link

theotrst commented Jun 3, 2024

maybe I missed it, but I noticed that when you have many pinned tabs (quite useful in horizontal view), these are placed –in vertical sidebery– horizontally within the sidebar. So, when the sidebar collapses, you don´t see them anymore. Is there a way to rearrange pinned tabs, as you have done for branched structure, when sidebar collapses?

(partially solved in settings "pinned tab position": by selecting "right" you always have the full list of pinned tabs visible)

@morrolinux
Copy link
Author

and modifying the last part of the css:

Thank you! I can confirm it works on other platforms too, so I updated the gist.

@morrolinux
Copy link
Author

maybe I missed it, but I noticed that when you have many pinned tabs (quite useful in horizontal view), these are placed –in vertical sidebery– horizontally within the sidebar. So, when the sidebar collapses, you don´t see them anymore. Is there a way to rearrange pinned tabs, as you have done for branched structure, when sidebar collapses?

(partially solved in settings "pinned tab position": by selecting "right" you always have the full list of pinned tabs visible)

Still unsolved for now, it's quite frustrating.

@marcomag89
Copy link

My configs

Features

  • [macOS] Restoring window controls, (ugly but works)
  • Add in-out delay
  • Icon and wrappers resize
  • collapsed: show only selected group/container
  • collapsed: restore new tab button
  • collapsed: wrap pinned tabs

Enjoy 🦊

Style Editor

#root {
  --transition-delay-out: 300ms;
  --transition-delay-in: 600ms;
  --thin-icon-width: 32px;
}

/* Collapse main */
#root:not(:hover) .main-items {
  width: var(--thin-icon-width);
  transition-delay: var(--transition-delay-out) !important;
}

#root:not(:hover) #nav_bar .main-items div[data-active="false"] {
  opacity: 0;
  transition-delay: var(--transition-delay-in) !important;
}

#root:not(:hover) #nav_bar .main-items .nav-item {
  transform: translateX(0) !important;
  transition-delay: var(--transition-delay-in) !important;
}

#root #nav_bar .main-items .nav-item {
  transition-delay: var(--transition-delay-out) !important;
}

/* Collapse new tab btn */
#root .new-tab-btns {
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-out) !important;
}

#root:not(:hover) .new-tab-btns {
  width: var(--thin-icon-width);
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-in) !important;
}

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

#root:not(:hover) .Tab {
  width: var(--thin-icon-width) !important;
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-in) !important;
}

#root:hover .Tab {
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-out) !important;
}

#root .Tab > .body > :not(div.fav) {
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-out) !important;
}

/* Collapse pinned */
#root:not(:hover) .PinnedTabsBar {
  max-width: var(--thin-icon-width) !important;
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-in) !important;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

#root:hover .PinnedTabsBar {
  max-width: 600px !important;
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-out) !important;
}

userCrome.css

#TabsToolbar>.toolbar-items{
    display: none;
}

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


:root {
    --thin-tab-width: 38px;
    --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;
    min-width: var(--thin-tab-width) !important;
    max-width: var(--thin-tab-width) !important;
    transition-delay: 600ms !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: all ease-out 300ms !important;
    min-width: var(--wide-tab-width) !important;
    max-width: var(--wide-tab-width) !important;
    transition-delay: 300ms !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;
}

@Gt1ult
Copy link

Gt1ult commented Jun 4, 2024

My configs

Features

* [macOS] Restoring window controls, (ugly but works)

* Add in-out delay

* Icon and wrappers resize

* collapsed: show only selected group/container

* collapsed: restore new tab button

* collapsed: wrap pinned tabs

Enjoy 🦊

Style Editor

#root {
  --transition-delay-out: 300ms;
  --transition-delay-in: 600ms;
  --thin-icon-width: 32px;
}

/* Collapse main */
#root:not(:hover) .main-items {
  width: var(--thin-icon-width);
  transition-delay: var(--transition-delay-out) !important;
}

#root:not(:hover) #nav_bar .main-items div[data-active="false"] {
  opacity: 0;
  transition-delay: var(--transition-delay-in) !important;
}

#root:not(:hover) #nav_bar .main-items .nav-item {
  transform: translateX(0) !important;
  transition-delay: var(--transition-delay-in) !important;
}

#root #nav_bar .main-items .nav-item {
  transition-delay: var(--transition-delay-out) !important;
}

/* Collapse new tab btn */
#root .new-tab-btns {
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-out) !important;
}

#root:not(:hover) .new-tab-btns {
  width: var(--thin-icon-width);
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-in) !important;
}

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

#root:not(:hover) .Tab {
  width: var(--thin-icon-width) !important;
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-in) !important;
}

#root:hover .Tab {
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-out) !important;
}

#root .Tab > .body > :not(div.fav) {
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-out) !important;
}

/* Collapse pinned */
#root:not(:hover) .PinnedTabsBar {
  max-width: var(--thin-icon-width) !important;
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-in) !important;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

#root:hover .PinnedTabsBar {
  max-width: 600px !important;
  transition: all 300ms !important;
  transition-delay: var(--transition-delay-out) !important;
}

userCrome.css

#TabsToolbar>.toolbar-items{
    display: none;
}

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


:root {
    --thin-tab-width: 38px;
    --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;
    min-width: var(--thin-tab-width) !important;
    max-width: var(--thin-tab-width) !important;
    transition-delay: 600ms !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: all ease-out 300ms !important;
    min-width: var(--wide-tab-width) !important;
    max-width: var(--wide-tab-width) !important;
    transition-delay: 300ms !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;
}

Thanks but it is not working properly, at least on my M1 air. For now essentially 2 issues: no orizontal tabs any more and cutting the first bookmark.

immagine

@markkarrica
Copy link

An improvement I would like to share is this: when the sidebar is collapsed show only the active tab panel instead of the first.
I made this fix by myself and this is the CSS code to put inside Sidebery configuration:

#root:not(:hover) .NavigationBar .nav-item[data-active=false] {
  opacity: 0;
}

#root:not(:hover) .NavigationBar .nav-item[data-active=true] {
  transform: translateX(0);
}

@Agosh13
Copy link

Agosh13 commented Jun 6, 2024

If you need the button on the left on mac, you've to change
flex-direction: row-reverse;
to
flex-direction: row;

@IvanLusso
Copy link

IvanLusso commented Jun 12, 2024

Hi! I'm in trouble, I tried to add the section about close window button, but it turned out like this:
immagine

Furthermore, toggle sidebery sidebar button don't show again the orizontal tab bar

@Agosh13
Copy link

Agosh13 commented Jun 12, 2024

Hi! I'm in trouble, I tried to add the section about close window button, but it turned out like this: immagine

Furthermore, toggle sidebery sidebar button don't show again the orizontal tab bar

` * 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;
}
#sidebar-header {
display: none;
}
#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;
}
#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; }/
/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; flex-wrap: wrap; }
#main-window[titlepreface*="XXX"] .titlebar-spacer{ display: none !important; }
#main-window[titlepreface*="XXX"] #nav-bar{border-left-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-width,0px)); border-right-width: var(--uc-window-drag-space-width,0px); 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; margin-left: 0 !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: 2px; flex: 1; flex-basis: 50%; width:10% !important; display: flex; max-width: 100px; height: 40px !important; 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; -moz-box-ordinal-group: 0 !important; direction: rtl !important;}
#PersonalToolbar {width: 100% !important; }
#tab-notification-deck {width: 100% !important; flex-basis: 100%; width: 100% !important;}
/
Hidden state: Fix z-index of active pinned tabs /
#main-window[titlepreface
="XXX"] #tabbrowser-tabs { z-index: 0 !important; }`

@spupuz
Copy link

spupuz commented Jun 12, 2024

and modifying the last part of the css:

Thank you! I can confirm it works on other platforms too, so I updated the gist.

Ciao Morro, i tested on my arch xfce and all is fine, but in windows host can't see minimize, maximize and close button. Any suggestion?

@dj-var
Copy link

dj-var commented Jun 12, 2024

Hi! I'm in trouble, I tried to add the section about close window button, but it turned out like this: immagine

Furthermore, toggle sidebery sidebar button don't show again the orizontal tab bar

I have this same problem too on Linux, and tried doing what you recommended in the following replies but it still doesn't work...:( it would be very nice to have the window control buttons in the top right when Sidebery's side bar is active....

@giordiemk
Copy link

image

I'm having this glitch on Win10. I tried tweaking the css, but I can't manage to make the buttons look right.

Also, above the minimize button the border is not in line with the rest of the window, as you can see in the screenshot. My priority would be fixing the close button's position first, though.

@piojpub
Copy link

piojpub commented Jun 15, 2024

Hi! I'm in trouble, I tried to add the section about close window button, but it turned out like this: immagine

Furthermore, toggle sidebery sidebar button don't show again the orizontal tab bar

Most likely you still have to comment out the lines relative to: To hide the "classic" horizontal tab toolar entirely

/* #TabsToolbar
{
visibility: collapse;
} */

Try it out!

@dj-var
Copy link

dj-var commented Jun 15, 2024

Ok, noticed that the window control buttons instructions were actually implemented in the main post and after following them it works perfectly fine on Linux. The only issue is on Windows just like @giordiemk mentioned. But other than that it works perfectly fine.

@piojpub
Copy link

piojpub commented Jun 15, 2024

My post was referred to the comment of @IvanLusso about showing the horizontal tab bar.

@dj-var
Copy link

dj-var commented Jun 15, 2024

My post was referred to the comment of @IvanLusso about showing the horizontal tab bar.

Sorry, I wasn't referring to you. I was responding to my earlier comments mentioning the issue of the window control buttons not displaying...

@fabfic
Copy link

fabfic commented Jun 23, 2024

For now essentially 2 issues: no orizontal tabs any more and cutting the first bookmark.

immagine

@Gt1ult I think i found a solution about the sidebar cutting the first bookmark.

I managed to fix it by commenting out the line z-index: 2; in

#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; */
}

Like shown here ↑

@Gt1ult
Copy link

Gt1ult commented Jun 24, 2024

For now essentially 2 issues: no orizontal tabs any more and cutting the first bookmark.

immagine

@Gt1ult I think i found a solution about the sidebar cutting the first bookmark.

I managed to fix it by commenting out the line z-index: 2; in

#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; */
}

Like shown here ↑

Thanks so much!!! Indeed problem solved!!!

@edogab33
Copy link

Got this odd padding. How do you make the background fill the entire space?

screenshot

@spupuz
Copy link

spupuz commented Jun 27, 2024

i have no buttons (minimize close and maximise) in linux and windows

@spupuz
Copy link

spupuz commented Jun 28, 2024

image

I'm having this glitch on Win10. I tried tweaking the css, but I can't manage to make the buttons look right.

Also, above the minimize button the border is not in line with the rest of the window, as you can see in the screenshot. My priority would be fixing the close button's position first, though.

do you solved it?

@giordano-bruno-michela-its

image
I'm having this glitch on Win10. I tried tweaking the css, but I can't manage to make the buttons look right.
Also, above the minimize button the border is not in line with the rest of the window, as you can see in the screenshot. My priority would be fixing the close button's position first, though.

do you solved it?

image

Well, not quite. I tweaked the css a little, but I'm not yet satisfied.

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