From a53bb3bf96a050719f68535acf9a71a67a2af15e Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Fri, 10 Oct 2025 18:36:50 +0300 Subject: [PATCH] autohide tabstoolbar v2: Add a hover target pseudo-element to capture hovering Previously we were showing tabs toolbar when the whole toolbox became hovered which would make using bookmarks and navigation toolbars pretty annoying. --- chrome/autohide_tabstoolbar_v2.css | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/chrome/autohide_tabstoolbar_v2.css b/chrome/autohide_tabstoolbar_v2.css index b817ad7..69da2df 100644 --- a/chrome/autohide_tabstoolbar_v2.css +++ b/chrome/autohide_tabstoolbar_v2.css @@ -43,25 +43,39 @@ See the above repository for updates as well as full license text. */ } @media not (-moz-bool-pref: "sidebar.verticalTabs"), not -moz-pref("sidebar.verticalTabs"){ - :root:not([customizing],[chromehidden~="menubar"]) #navigator-toolbox:hover, + :root:not([customizing],[chromehidden~="menubar"]) #navigator-toolbox:has(> :is(#toolbar-menubar,#TabsToolbar):hover), :root:not([customizing],[chromehidden~="menubar"]) #TabsToolbar{ margin-bottom: calc(0px - 2 * var(--tab-block-margin) - var(--tab-min-height)); } + #toolbar-menubar:is([autohide=""],[autohide="true"]) + #TabsToolbar:not(:hover){ + -moz-window-dragging: no-drag !important; + } + #toolbar-menubar:is([autohide=""],[autohide="true"]) + #TabsToolbar:not(:hover,[customizing])::before{ + content: ""; + display: flex; + position: absolute; + height: 6px; + width: 100vw; + visibility: visible; + } #navigator-toolbox{ transition: margin-bottom var(--uc-tabs-hide-animation-duration) ease-out var(--uc-tabs-hide-animation-delay) !important; --browser-area-z-index-toolbox: 3; } #TabsToolbar:not([customizing]){ visibility: hidden; + position: relative; + z-index: 1; transition: visibility 0ms linear var(--uc-tabs-hide-animation-delay), margin-bottom var(--uc-tabs-hide-animation-duration) ease-out var(--uc-tabs-hide-animation-delay) !important; } - #navigator-toolbox:is(:hover,[movingtab]){ + #navigator-toolbox:has(> :is(#toolbar-menubar,#TabsToolbar):hover), + #navigator-toolbox[movingtab]{ transition-delay: 0s !important; > #TabsToolbar{ visibility: visible; margin-bottom: 0px; - transition-delay: 18ms, 0ms !important; + transition-delay: 0ms, 0ms !important; } } @media (-moz-bool-pref: "userchrome.autohidetabs.show-while-inactive.enabled"), @@ -81,4 +95,3 @@ See the above repository for updates as well as full license text. */ .tab-label{ line-height: 20px !important; } :root[uidensity="compact"] .tab-label{ line-height: 18px !important; } } -