Created
July 8, 2018 04:16
-
-
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
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
@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; | |
} |
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
/u/PEdrArthur, i saw your post on /r/FirefoxCSS about the order
"The drawback is that it also puts address bar on top of the tab bar. If someone has some idea on how to implement this without inverting bar's positions, please let me know!"
Try change the respective code to this:
#TabsToolbar {
-moz-box-ordinal-group: 1 !important;
}
#PersonalToolbar {
-moz-box-ordinal-group: 2 !important;
}
#nav-bar {
-moz-box-ordinal-group: 3 !important;
border-top-width: 0 !important;
}