Created
November 27, 2024 21:00
-
-
Save AnPerello/bf6441165b699dc4ef29bc057c924e02 to your computer and use it in GitHub Desktop.
My userChrome.css (Firefox+Sidebery)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#main-window[titlepreface*="XXX"] #TabsToolbar | |
{ | |
visibility: collapse; | |
} | |
/* Auto hide horizontal tab */ | |
#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; } | |
/*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;} | |
#main-window[titlepreface*="XXX"] .titlebar-buttonbox-container { | |
display: flex !important; | |
box-sizing: border-box; | |
justify-content:space-between; | |
flex-direction: row-reverse; | |
flex-wrap: wrap; | |
} | |
#PersonalToolbar {width: 100% !important; } | |
#tab-notification-deck {width: 100% !important; flex-basis: 100%; width: 100% !important;} | |
/*terzo*/ | |
#sidebar-header { | |
display: none; | |
} | |
/*Quarto*/ | |
#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: 9999; | |
} | |
#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: 9998; | |
margin-right: calc((var(--wide-tab-width) - var(--thin-tab-width)) * -1) !important; | |
} |
It worked almost perfectly on W10. I'd just change this parameter ( --thin-tab-width: 32px;) to fit in 30px, or first pixels of tab name will appear, making it ugly. There is a bug though when I close FIrefox and start it again, when restoring previous session you need to click the "Toggle sidebery sidebar" to make tabs appear, or the sidebar would not show anything. Thanks for the improvement!
Thank you for bringing this to my attention. I've already created a fork of the original instructions.md
(which can be found here: https://gist.github.com/AnPerello/8ad54a4cc536b17cb572528d3f206a2e )
so that people can copy only the snippets they need with all the fixes, including the one you noticed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It worked almost perfectly on W10. I'd just change this parameter ( --thin-tab-width: 32px;) to fit in 30px, or first pixels of tab name will appear, making it ugly. There is a bug though when I close FIrefox and start it again, when restoring previous session you need to click the "Toggle sidebery sidebar" to make tabs appear, or the sidebar would not show anything. Thanks for the improvement!