Skip to content

Instantly share code, notes, and snippets.

@Zren Zren/userChrome.css
Last active Feb 13, 2019

Embed
What would you like to do?
Firefox userChrome.css
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
/*
* Bookmarks toolbar is visible only on new tab page, just like Chrome.
*
* Screenshot: https://vimeo.com/235059188
* Video: https://vimeo.com/240436456
*
* Contributor(s): https://www.reddit.com/user/AJtfM7zT4tJdaZsm and Andrei Cristian Petcu
* https://www.reddit.com/r/FirefoxCSS/comments/7evwow/show_bookmarks_toolbar_only_on_new_tab/
*/
#main-window #PersonalToolbar {
visibility: collapse !important;
}
#main-window[title^="about:newtab"] #PersonalToolbar,
#main-window[title^="New Tab"] #PersonalToolbar,
#main-window[title^="Nightly"] #PersonalToolbar,
#main-window[title^="Mozilla Firefox"] #PersonalToolbar,
#main-window[title^="Firefox"] #PersonalToolbar {
visibility: visible !important;
}
/* Remove left tabbar padding when not maximized. */
.titlebar-placeholder[type="pre-tabs"], /* Firefox 64 */
.titlebar-spacer[type="pre-tabs"] { /* Firefox 65 */
width: 0 !important;
}
/* Compact density is 29px tall, while Breath close buttons are 32px tall.
* We need to remove 3px "padding" from the top tabbar so tabs align
* to the windows top edge. */
/* Fitts Law with close button when maximized */
.titlebar-close {
/* margin-right: -6px !important; */
/* width: 29px !important; */
}
.titlebar-buttonbox {
margin-right: -6px;
}
/* Don't animate fullscreen switch. It's stutters with Youtube. */
#navigator-toolbox[fullscreenShouldAnimate] {
transition: 0s margin-top !important;
}
/* Pastel purple titlebar when in private browsing mode. */
window[privatebrowsingmode="temporary"] #navigator-toolbox {
background: #c8a9c8 !important;
}
/* Picture in Picture */
#main-window[sizemode="normal"][width="567"][height="320"] #titlebar,
#main-window[sizemode="normal"][width="567"][height="320"] #navigator-toolbox {
display: none;
}
/*
@window (max-width: 500px) {
#titlebar,
#navigator-toolbox {
display: none;
}
}
*/
/* Hide ContextMenu Items */
/* https://support.mozilla.org/en-US/questions/1177488 */
#contentAreaContextMenu #context-openlinkincurrent,
#contentAreaContextMenu #context-openlinkinusercontext-menu,
#contentAreaContextMenu #context-bookmarklink,
#contentAreaContextMenu #context-selectall,
#contentAreaContextMenu #context-sendlinktodevice,
#contentAreaContextMenu #context-sendpagetodevice,
#contentAreaContextMenu #context-sep-sendlinktodevice,
#contentAreaContextMenu #context-sep-sendpagetodevice,
#contentAreaContextMenu #context-viewpartialsource-selection {
display: none !important;
}
/* Fix random titlebar margin-bottom: 0px */
#titlebar {
/*! margin-bottom: -29px !important; */
}
/* Scrollbar */
:root{
/*scrollbar-color: #336699 #000000;*/
/*scrollbar-width: thin;*/
}
/****** Dark Theme ******/
/*** Tab Row ***/
#navigator-toolbox {
color: #c2c4c5 !important;
}
#titlebar,
#navigator-toolbox,
#TabsToolbar,
#tabbrowser-tabs {
background-color: #202124 !important;
}
/* Tabs */
.tabbrowser-tab {
color: #c2c4c5 !important;
}
.tabbrowser-tab:not([visuallyselected="true"]) {
color: #a3a9ae !important;
}
.tab-background {
background-color: #27292c !important;
}
.tabbrowser-tab:hover {
background-color: #27292c !important;
}
.tabbrowser-tab:hover > .tab-stack > .tab-background > .tab-line:not([selected=true]):not([multiselected]) {
background-color: transparent !important;
}
.tab-background {
background-color: transparent !important;
background-image: none !important;
}
.tab-background[selected="true"] {
background-color: #323639 !important;
background-image: none !important;
}
/* New Tab + Addon Buttons */
.toolbarbutton-animatable-box,
.toolbarbutton-1 {
color: #9aa0a6 !important;
}
.toolbarbutton-animatable-box:hover,
.toolbarbutton-1:hover {
color: #a4a9af !important;
}
toolbar .toolbarbutton-1 > .toolbarbutton-icon {
transition: background-color 0.2s;
}
toolbar .toolbarbutton-1:not([disabled="true"]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-badge-stack,
toolbar .toolbarbutton-1:not([disabled="true"]):not([checked]):not([open]):not(:active):hover > .toolbarbutton-icon {
background-color: #424649 !important;
}
toolbar .tabs-newtab-button.toolbarbutton-1:hover .toolbarbutton-icon,
toolbar .tabs-newtab-button.toolbarbutton-1:not([disabled="true"]):not([checked]):not([open]):not(:active):hover .toolbarbutton-icon {
background-color: #363739 !important;
}
/* Purple titlebar when in private browsing mode. 25003e */
window[privatebrowsingmode="temporary"] #navigator-toolbox,
window[privatebrowsingmode="temporary"] #TabsToolbar,
window[privatebrowsingmode="temporary"] #tabbrowser-tabs {
background: #201726 !important;
}
/* Close Buttons */
.titlebar-buttonbox {
color: #eee !important;
height: 29px !important;
}
.titlebar-buttonbox toolbarbutton:hover::before {
border-color: #eee;
}
.titlebar-buttonbox toolbarbutton:-moz-any(:hover, [open]) {
color: #fff !important;
}
.titlebar-buttonbox toolbarbutton {
-moz-appearance: unset !important;
width: 24px;
height: 33px;
padding-bottom: 30px !important;
}
:root[tabsintitlebar][uidensity="compact"] .titlebar-buttonbox toolbarbutton {
height: 29px;
padding-bottom: 26px !important;
}
:root[tabsintitlebar][uidensity="touch"] .titlebar-buttonbox toolbarbutton {
height: 41px;
padding-bottom: 38px !important;
}
.titlebar-buttonbox toolbarbutton::before {
position: absolute;
content: "";
top: 2px !important;
display: block;
width: 20px;
box-sizing: border-box;
height: 16px;
border: 1px solid #57575a;
box-shadow: 0 0 1px #1a1b1d;
border-radius: 3px;
}
.titlebar-min::before { left: 2px; }
.titlebar-max::before { left: 26px; }
.titlebar-close::before { left: 50px; }
.titlebar-min::after,
.titlebar-max::after,
.titlebar-close::after {
position: absolute;
content: "";
direction: block;
top: 0px;
width: 20px;
height: 14px;
vertical-align: middle;
text-align: center;
}
.titlebar-min::after { left: 2px; }
.titlebar-max::after { left: 26px; }
.titlebar-close::after { left: 50px; }
.titlebar-min::after {
content: "_";
font-size: 16px;
line-height: 7px;
}
/*
.titlebar-max::after {
content: "□";
font-size: 8px;
line-height: 18px;
}
*/
.titlebar-max::after {
/* maximize */
border: 1px solid #eee;
border-radius: 2px;
top: 6px !important;
left: 31px;
height: 6px !important;
width: 8px;
}
window[sizemode="maximized"] .titlebar-max::after {
/* un-maximize */
top: 7px !important;
left: 31px;
height: 5px !important;
width: 8px;
}
.titlebar-close::after {
content: "×";
font-size: 14px;
line-height: 19px;
}
/*** Address Bar Row ***/
/* Address Bar */
#nav-bar {
background: #323639 !important;
}
#urlbar {
background-color: #282c2f !important;
color: #c2c4c5 !important;
transition: background-color 0.2s, border-color 0.2s;
}
#urlbar:not(:-moz-lwtheme):not([focused="true"]),
.searchbar-textbox:not(:-moz-lwtheme):not([focused="true"]) {
border-color: #323639 !important;
}
#urlbar[focused="true"],
.searchbar-textbox[focused="true"] {
background-color: #3c4043 !important;
border-color: #5b6e8b !important;
}
#urlbar html|input.textbox-input::-moz-selection {
background-color: #205fb5 !important;
color: #eff4fa !important;
}
/* Addon Buttons + Bookmark Buttons */
toolbar toolbarbutton,
toolbar toolbarbutton .toolbarbutton-badge-stack,
toolbar toolbarbutton .toolbarbutton-icon {
transition: background 0.4s, background-color 0.4s, background-image 0.4s, fill 0.4s, fill-opacity 0.4s;
}
/*** Bookmarks Bar Row ***/
#PersonalToolbar {
color: #c2c4c5 !important;
background: #323639 !important;
}
/*** Toolbar Seperator ***/
#navigator-toolbox::after {
border-bottom-color: #323639 !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.