Skip to content

Instantly share code, notes, and snippets.

@mireq mireq/userChrome.css
Last active Sep 17, 2019

Embed
What would you like to do?
Compact responsive oneliner for Firefox
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Hide buttons **/
:root:not([customizing]) #nav-bar toolbarbutton {
margin-left: -30px !important;
opacity: 0 !important;
pointer-events: none !important;
transition: all 100ms var(--animation-easing-function) !important;
}
/* Show on hover or focus */
:root:not([customizing]) :hover > #nav-bar toolbarbutton,
:root:not([customizing]) #navigator-toolbox:focus-within #nav-bar toolbarbutton,
:root:not([customizing]) :hover > #titlebar toolbarbutton {
margin-left: 0 !important;
opacity: 1 !important;
pointer-events: auto !important;
}
/* Don't hide tab buttons */
:root:not([customizing]) :hover > #titlebar #TabsToolbar toolbarbutton {
margin-left: 0px !important;
opacity: 1 !important;
pointer-events: auto !important;
}
/* Hide controls on urlbar focus */
:root:not([customizing]) #navigator-toolbox #nav-bar #urlbar-container:focus-within {
width: 100% !important;
position: absolute !important;
left: 0 !important;
white-space: nowrap;
}
:root:not([customizing]) #navigator-toolbox #nav-bar #urlbar-container:focus-within #urlbar {
width: 100% !important;
}
/* Move tabs 35% to rihgt */
#TabsToolbar {
margin-left: 35vw !important;
}
/* Move navigation 65% to left and negative margin to move to top line */
#nav-bar {
margin-right: 65vw !important;
margin-top: -29px !important;
background: transparent !important;
z-index: 2;
}
/* Full height url bar without border radius */
#nav-bar {
min-height: 29px !important;
}
#urlbar {
border: 0px solid transparent !important;
border-radius: 0 !important;
margin: 0 1px 0 0 !important;
min-height: 29px !important;
}
@media (max-width: 1200px) {
/* Full size url bar on small screen if url bar is focused */
#navigator-toolbox #nav-bar:focus-within {
margin-right: 0vw !important;
z-index: 2 !important;
background-attachment: fixed !important;
background-color: transparent !important;
background-image: var(--lwt-header-image) !important;
background-position: right top !important;
background-repeat: no-repeat !important;
background-size: auto auto !important;
}
/* Buttons leave hidden on hover */
:root:not([customizing]) :hover > #nav-bar toolbarbutton,
:root:not([customizing]) :hover > #titlebar toolbarbutton {
margin-left: -30px !important;
opacity: 0 !important;
pointer-events: none !important;
}
/* Do not hide buttons on urlbar focus */
:root:not([customizing]) #navigator-toolbox #nav-bar #urlbar-container:focus-within {
position: static !important;
width: auto !important;
}
/* Hide shadow over url bar */
.tabbrowser-arrowscrollbox > .arrowscrollbox-overflow-start-indicator:not([collapsed]),
.tabbrowser-arrowscrollbox > .arrowscrollbox-overflow-end-indicator:not([collapsed]) {
background-image: none !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.