Skip to content

Instantly share code, notes, and snippets.

@pedroarthur
Created July 8, 2018 04:16
Show Gist options
  • Save pedroarthur/02121730f4875c14646fd5293d9818a6 to your computer and use it in GitHub Desktop.
Save pedroarthur/02121730f4875c14646fd5293d9818a6 to your computer and use it in GitHub Desktop.
Change Firefox UI to i) auto hide address bar; and ii) hide tab bar when there is only one tab opened
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/*
* From https://gist.github.com/BenoitAverty/af633ee20e27f48f9ba7178451432206
*/
#tabbrowser-tabs, #tabbrowser-tabs > .tabbrowser-arrowscrollbox {
min-height: 0 !important;
}
#tabbrowser-tabs tab[first-visible-tab="true"][last-visible-tab="true"] {
visibility: collapse;
}
#tabbrowser-tabs .tabs-newtab-button {
visibility: collapse !important;
}
#tabbrowser-tabs, #tabbrowser-tabs > .tabbrowser-arrowscrollbox main-window[privatebrowsingmode="temporary"]{
min-height: var(--tab-min-height)
}
#tabbrowser-tabs tab {
min-height: var(--tab-min-height)
}
/*
* From https://support.mozilla.org/en-US/questions/1185426
*/
#nav-bar {
-moz-box-ordinal-group: 1 !important;
border-top-width: 0 !important;
}
#PersonalToolbar {
-moz-box-ordinal-group: 2 !important;
}
#TabsToolbar {
-moz-box-ordinal-group: 3 !important;
}
/*
* Based on firefox own behavior while in fullscreen
*/
#navigator-toolbox {
margin-top: -40px;
transition: margin-top 0.5s;
}
#navigator-toolbox:hover, #navigator-toolbox:focus-within {
margin-top: 0px;
transition: margin-top 0.5s;
}
@benyaminl
Copy link

benyaminl commented Sep 23, 2021

This still works on firefox 92 Stable, seems will still works on 94 nightly. Will test next day. Thanks!

And if we use https://github.com/andreasgrafen/cascade
Then we need only this rules

#navigator-toolbox {
	margin-top: -32px;
	transition: margin-top 0.5s;
}

#navigator-toolbox:hover, #navigator-toolbox:focus-within {
	margin-top: 0px;
	transition: margin-top 0.5s;
}

And it's done. Well this's very powerfull indeed. Than you.

This make browser as native Application!

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