From 625aad8dbc4574e7363a43005366433d65c56546 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sat, 8 Feb 2025 18:00:57 +0200 Subject: [PATCH] autohide tabs toolbar v2: Don't rely on [expanded] attribute Firefox 135 uses resize observer to toggle the expanded state, so the attribute will get removed when autohide makes the tabs collapse. Thus, we cannot differentiate between manually collapsed and expanded states. --- chrome/autohide_tabstoolbar_v2.css | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chrome/autohide_tabstoolbar_v2.css b/chrome/autohide_tabstoolbar_v2.css index a94faf1..5d8634d 100644 --- a/chrome/autohide_tabstoolbar_v2.css +++ b/chrome/autohide_tabstoolbar_v2.css @@ -9,13 +9,14 @@ See the above repository for updates as well as full license text. */ } @media (-moz-bool-pref: "sidebar.verticalTabs"){ - #sidebar-main:has(>[expanded]){ + #sidebar-main{ overflow: visible !important; - max-width: var(--tab-collapsed-width); + max-width: var(--tab-collapsed-width) !important; z-index: var(--browser-area-z-index-toolbox-while-animating); transition: z-index 0s linear var(--uc-tabs-hide-duration); + background: inherit; } - #sidebar-main >[expanded]{ + sidebar-main{ --tab-pinned-horizontal-count: 5; /* This needs to match whatever is used in sidebar-main.css - currently 5 */ background: inherit; overflow: hidden; @@ -28,7 +29,7 @@ See the above repository for updates as well as full license text. */ border-inline-width: 0.01px 0; } } - #sidebar-main >[expanded]:hover{ + sidebar-main:hover{ min-width: calc(var(--tab-pinned-horizontal-count) * var(--tab-pinned-min-width-expanded) + 2 * var(--tab-pinned-container-margin-inline-expanded) + 1px); transition-delay: 0ms !important; &[positionend]{