From 4f3ac169e3e77f031993a5af9e924ec8e45001a1 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Thu, 23 Nov 2023 17:02:57 +0200 Subject: [PATCH] autohide bm and main toolbars: Fix margins in fullscreen mode Previously if Firefox was in fullscreen mode and toolbars would autohide (per Firefox normal setting) then this style would cause content area to be pushed way too far up because of computed margin-top on navigator-toolbox. This patch makes navigator toolbox use margin computed from tabs toolbar height. --- chrome/autohide_bookmarks_and_main_toolbars.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chrome/autohide_bookmarks_and_main_toolbars.css b/chrome/autohide_bookmarks_and_main_toolbars.css index 790c502..9ec328f 100644 --- a/chrome/autohide_bookmarks_and_main_toolbars.css +++ b/chrome/autohide_bookmarks_and_main_toolbars.css @@ -95,7 +95,11 @@ See the above repository for updates as well as full license text. */ margin-bottom: calc(-1px - var(--uc-bm-height) + var(--uc-navbar-height)) !important; z-index: auto !important; } - +@media (-moz-bool-pref: "browser.fullscreen.autohide"){ + :root[sizemode="fullscreen"] #navigator-toolbox[style*="margin-top"]{ + margin-top: calc(1px - var(--tab-min-height) - 2 * var(--tab-block-margin)) !important; + } +} /* Uncomment the next part to enable compatibility for multi-row_bookmarks.css * This would break buttons placed in the toolbar, * but that is likely not happening if you are using multi-row setup