From fd88af0e85f880ac0fb35e8b79e7335b849d6c04 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Thu, 23 Nov 2023 17:27:28 +0200 Subject: [PATCH] autohidden toolbars: Use :has() to show toolbar if menu popup is hovered --- chrome/autohide_bookmarks_and_main_toolbars.css | 7 +++++++ chrome/autohide_main_toolbar.css | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/chrome/autohide_bookmarks_and_main_toolbars.css b/chrome/autohide_bookmarks_and_main_toolbars.css index 9ec328f..fdcc814 100644 --- a/chrome/autohide_bookmarks_and_main_toolbars.css +++ b/chrome/autohide_bookmarks_and_main_toolbars.css @@ -86,6 +86,13 @@ See the above repository for updates as well as full license text. */ transition-delay: 100ms !important; transform: rotateX(0); } + +/* This ruleset is separate, because not having :has support breaks other selectors as well */ +#mainPopupSet:has(> #appMenu-popup:hover) ~ #navigator-toolbox > .browser-toolbar{ + transition-delay: 33ms !important; + transform: rotateX(0); +} + /* This makes the tab notification box show immediately below tabs, otherwise it would break the layout */ #navigator-toolbox > div{ display: contents } :where(#titlebar,#tab-notification-deck,.global-notificationbox){ diff --git a/chrome/autohide_main_toolbar.css b/chrome/autohide_main_toolbar.css index 59a4095..9564bd8 100644 --- a/chrome/autohide_main_toolbar.css +++ b/chrome/autohide_main_toolbar.css @@ -39,6 +39,12 @@ See the above repository for updates as well as full license text. */ transition-duration: 500ms, 200ms !important; transition-delay: 0s !important; } +/* This ruleset is separate, because not having :has support breaks other selectors as well */ +#mainPopupSet:has(> #appMenu-popup:hover) ~ #navigator-toolbox > .browser-toolbar{ + transition-delay: 33ms !important; + transform: translateY(0); + opacity: 1; +} /* Bookmarks toolbar needs so extra rules */ #PersonalToolbar{ transition: transform 400ms ease 1.8s !important; position: relative; z-index: 1 }