Skip to content

Instantly share code, notes, and snippets.

@token0
Forked from BrianGilbert/userChrome.css
Last active April 10, 2022 01:13
Show Gist options
  • Save token0/cdc55f13f7bb408c12dec442870d1788 to your computer and use it in GitHub Desktop.
Save token0/cdc55f13f7bb408c12dec442870d1788 to your computer and use it in GitHub Desktop.
Firefox userChrome to autohide Sideberry panel and hide titlebar tabs, and autohide Page Actions.
/*@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");*/
/* ^ disabled namespace, so fullscreen state can be processed */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* This style will hide the tab bar. For MacOS Big Sur
*
* Contributor(s): Isaac-Newt, Ivan0xFF, millerdev, AMomchilov
*/
/* Mac Specific Rules
#titlebar {
visibility: collapse !important;
}
#TabsToolbar .titlebar-buttonbox-container {
display: block;
position: absolute;
visibility: visible;
}
:root:not([uidensity]) #TabsToolbar .titlebar-buttonbox-container {
margin-left: 12px;
margin-top: 12px;
}
:root[uidensity="compact"] #TabsToolbar .titlebar-buttonbox-container {
margin-left: 10px;
margin-top: 9px;
}
#TabsToolbar .titlebar-buttonbox.titlebar-color {
margin-left: 0px !important;
}
#main-window:not([inFullscreen]) #nav-bar {
padding: 0px 0px 0px 70px !important;
}
* Mac specific rules */
/* Win7 specific rules */
.tabbrowser-tab {
visibility: collapse;
}
.titlebar-button {
height: 27px !important;
}
#nav-bar {
margin-top: -42px;
margin-right: 115px;
box-shadow: none !important;
}
[uidensity="compact"]:root .titlebar-button {
height: 32px !important;
}
[uidensity="compact"]:root #nav-bar {
margin-top: -32px;
}
#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);
}
/* Win7 specific rules */
/* Sidebery Dynamic sidebar */
#sidebar-box {
overflow: hidden;
height: calc(100% - 72px);
position: fixed;
max-width: 120px;
display: block;
transition: 90ms;
z-index: 3;
}
#sidebar-box:hover {
max-width: 100%;
}
#sidebar {
width: calc(30px * 10) !important;
max-width: 50vw !important;
height: calc(100% - 42px);
}
#appcontent {
margin-left: 120px;
}
/* Minimize fullscreen transition time */
#navigator-toolbox[fullscreenShouldAnimate] {
transition: 100ms !important;
}
/* Auto-hide sidebar in fullscreen */
#main-window[inFullscreen="true"] #sidebar,
#main-window[inFullscreen="true"] #sidebar-box,
#main-window[inFullscreen="true"] #sidebar-splitter {
display: none !important;
width: 0px !important;
}
#main-window[inFullscreen="true"] #appcontent {
margin-left: 0px;
}
/* Page Actions Hide and Show on Hover */
/* Hide Buttons and Reveal on Hover */
#page-action-buttons:not(:hover) .urlbar-page-action,
#page-action-buttons:not(:hover) #star-button
{
width: 0px !important;
min-width: 0px !important;
padding-left: 0px !important;
padding-right: 10px !important;
margin-right: -5px !important;
transition: all 250ms ease-in-out;
}
#page-action-buttons:not(:hover) #userContext-indicator {
margin-right : 37px !important;
transition: all 250ms ease-in-out;
}
#page-action-buttons:hover .urlbar-page-action,
#page-action-buttons:hover #star-button {
visibility: visible;
min-width: unset !important;
}
#page-action-buttons:hover #userContext-indicator {
margin-right : 0px !important;
}
/* Create page actions hover "button" */
#page-action-buttons::after {
content: "•••";
position: absolute;
top: 0.7em;
font-size: 0.7em;
opacity: 0.5;
right: 8px;
transition: all 50ms ease-in-out;
}
/* Hide the button on hover */
#page-action-buttons:hover::after {
display: none !important;
width: 0px !important;
margin-left: 0px !important;
transition: all 50ms ease-in-out;
}
/* Hide Buttons and Reveal on Hover Finished*/
#urlbar,#searchbar {
font-size: 13px !important;
margin-top: 1px !important;
}
@token0
Copy link
Author

token0 commented Apr 9, 2022

Modified for IceCat on Windows 7 with default DPI

  • New Tab button at the bottom of Sidebery is now visible;
  • Increased collapsed bar width;
  • Decreased grip space between Menu button and Window control buttons;

@token0
Copy link
Author

token0 commented Apr 10, 2022

  • Disabled sidebar in fullscreen mode
  • Decreased fullscreen transition time (for F11 only, for youtube fullscreen transition search for full-screen-api.transition-duration in about:config)

@token0
Copy link
Author

token0 commented Apr 10, 2022

  • Disabled namespace, so fullscreen state can be processed

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