I think Firefox 75 broke auto-hide.css
LOuroboros opened this issue · 8 comments
Title.
In Firefox 75, possibly a product of the Megabar, the position of the navbar is off when using toolbars/auto-hide.css.
https://streamable.com/tze7ej
Likewise here with 75 under linux
Had the same problem, i came up with a quick fix not sure yet if there is a better way currently but it's working for now.
#urlbar {
position: absolute!important;
top: 0!important;
}
#urlbar-input-container {
height: 32px!important;
}
The height value would change based on what you have yours set to.
Cheers for that, @A-Lamia!
With yours I got the following:
So I tweaked it a little bit more to this:
#urlbar {
position: absolute!important;
top: 3px!important;
}
#urlbar-input-container {
height: 26px!important;
}
And got:
The tweaks might just be for my local though so ymmv =)
Glad it helped @pauricthelodger.
That's why it's a quick fix, top
and height
need to be adjusted to fit your local firefox version, been looking in to a more static solution but the couple i have come up with had other side effects that are not desirable.
So after some time i have figured out that the issue is the code is setting #urlbar
's internal variable --urlbar-toolbar-height
to 1px
from 32px
(or what ever yours is set to.).
The value of --urlbar-toolbar-height
from what i can tell (could be wrong) is fetched from what ever the height of #nav-bar
is on startup, in this case it gets set to 1px because of auto hide.
This is causing a calc()
function on the top
property in #urlbar[breakout]
to calculate incorrectly giving us the positioning errors.
#nav-bar {
--navbar-height: 32px;
}
#nav-bar:not([customizing="true"]):not([inFullscreen]){
min-height: 1px !important;
max-height: 0px !important;
margin-top: 1px !important;
margin-bottom: -1px !important;
transition: all 50ms linear 0s !important;
z-index: -5 !important;
}
#navigator-toolbox:hover:not([inFullscreen]) :-moz-any(#nav-bar),
#navigator-toolbox:focus-within :-moz-any(#nav-bar) {
min-height: var(--navbar-height) !important;
max-height: var(--navbar-height) !important;
margin-top: 1px !important;
margin-bottom: calc(-1 * var(--navbar-height)) !important;
opacity: 1 !important;
transition: all 50ms linear 0s !important;
z-index: 5 !important;
}
/* Restores the variables original value. */
#urlbar.megabar {
--urlbar-toolbar-height: var(--navbar-height) !important;
}
/* Positions the url view to the bottom of your toolbar and aligned with top border. */
.urlbarView.megabar {
top: -2px !important;
}
Since right now auto-hide.css no longer hides the bookmarks bar forcing the user to add a separate piece of code (sliding-bookmarks-bar.css), I looked into fixing the old code for auto-hide.css when it still contained the bits that hid the bookmarks bar on the process for my personal use, and thanks to the modification provided above by @A-Lamia, I was able to.
Thank you very much, A-Lamia!
This is how it looks on my end:
/*
* Auto-hide the URL-bar and bookmarks bar, show on hover or focus
* https://github.com/Timvde/UserChrome-Tweaks/blob/master/toolbars/auto-hide.css
* Contributor(s): Alex Vallat
*/
#PersonalToolbar:not([customizing]),
#nav-bar:not([customizing="true"]):not([inFullscreen]) {
min-height: 1px !important;
max-height: 0px !important;
margin-top: 1px !important;
margin-bottom: -1px !important;
transition: 0s !important;
z-index: -5 !important;
}
#navigator-toolbox:hover:not([inFullscreen]) :-moz-any(#nav-bar),
#navigator-toolbox:focus-within :-moz-any(#nav-bar) {
min-height: 30px !important;
max-height: 30px !important;
margin-top: 1px !important;
margin-bottom: -30px !important;
transition: 0s !important;
z-index: 5 !important;
}
#navigator-toolbox:hover:not([inFullscreen]) :-moz-any(#PersonalToolbar),
#navigator-toolbox:focus-within :-moz-any(#PersonalToolbar) {
min-height: 21px !important;
max-height: 21px !important;
margin-top: 30px !important;
transition: 0s !important;
z-index: 5 !important;
}
#urlbar {
top: 4px !important;
bottom: 0px !important;
}
I would very much welcome a pull request :)