From 9e39c99f50642d90f4bb783638e19408fcedbdde Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Thu, 18 Sep 2025 17:06:31 +0300 Subject: [PATCH] Support [autohide] as boolean attribute Firefox 143 uses authide as boolean attribute, so we need to support both versions, thus selectors looking mildly horrifying --- chrome/autohide_bookmarks_and_main_toolbars.css | 2 +- chrome/autohide_main_toolbar.css | 2 +- chrome/classic_firefox_menu_button.css | 2 +- chrome/click_selected_tab_to_focus_urlbar.css | 4 ++-- chrome/combined_tabs_and_main_toolbars.css | 4 ++-- chrome/hide_tabs_toolbar.css | 2 +- chrome/hide_tabs_toolbar_v2.css | 2 +- chrome/hide_tabs_with_one_tab.css | 2 +- chrome/oneline_toolbar.css | 8 ++++---- chrome/overlay_menubar.css | 4 ++-- chrome/selected_tab_as_urlbar.css | 2 +- chrome/tabs_below_content_v2.css | 2 +- chrome/tabs_on_bottom_v2.css | 2 +- chrome/toggle_tabs_toolbar_with_alt.css | 6 +++--- chrome/vertical_popup_menubar.css | 6 +++--- chrome/vertical_tabs.css | 2 +- 16 files changed, 26 insertions(+), 26 deletions(-) diff --git a/chrome/autohide_bookmarks_and_main_toolbars.css b/chrome/autohide_bookmarks_and_main_toolbars.css index ea5c4a3..a7b3245 100644 --- a/chrome/autohide_bookmarks_and_main_toolbars.css +++ b/chrome/autohide_bookmarks_and_main_toolbars.css @@ -23,7 +23,7 @@ See the above repository for updates as well as full license text. */ * density settings and whether or not menubar is enabled. */ @media (min-resolution: 120dpi){ - :root[uidensity="compact"] #navigator-toolbox:has(> #toolbar-menubar[autohide="false"]){ + :root[uidensity="compact"] #navigator-toolbox:has(> #toolbar-menubar:is([autohide="false"],not([autohide]))){ --uc-toolbox-browser-area-overlap: -0.5px; } } diff --git a/chrome/autohide_main_toolbar.css b/chrome/autohide_main_toolbar.css index 9186ff6..5a723fd 100644 --- a/chrome/autohide_main_toolbar.css +++ b/chrome/autohide_main_toolbar.css @@ -79,7 +79,7 @@ See the above repository for updates as well as full license text. */ #nav-bar.browser-titlebar{ background: inherit; } -#toolbar-menubar:not([autohide="true"]) ~ #nav-bar.browser-titlebar{ +#toolbar-menubar:not([autohide="true"],[autohide=""]) ~ #nav-bar.browser-titlebar{ background-position-y: -28px; /* best guess, could vary */ border-top: none !important; } diff --git a/chrome/classic_firefox_menu_button.css b/chrome/classic_firefox_menu_button.css index f14e0ec..5ce3383 100644 --- a/chrome/classic_firefox_menu_button.css +++ b/chrome/classic_firefox_menu_button.css @@ -63,7 +63,7 @@ See the above repository for updates as well as full license text. */ } #toolbar-menubar, -#toolbar-menubar[autohide="true"] + #TabsToolbar{ +#toolbar-menubar:is([autohide="true"],[autohide=""]) + #TabsToolbar{ padding-left: 94px !important; } diff --git a/chrome/click_selected_tab_to_focus_urlbar.css b/chrome/click_selected_tab_to_focus_urlbar.css index 7adb053..2f6cc80 100644 --- a/chrome/click_selected_tab_to_focus_urlbar.css +++ b/chrome/click_selected_tab_to_focus_urlbar.css @@ -23,8 +23,8 @@ See the above repository for updates as well as full license text. */ :root:is([sizemode="maximized"],[sizemode="fullscreen"]){ --uc-window-drag-space-width: 0px; } - #toolbar-menubar[autohide="false"] ~ #nav-bar, - #titlebar:has(> [autohide="false"]) + #nav-bar{ + #toolbar-menubar:is([autohide="false"],not([autohide])) ~ #nav-bar, + #titlebar:has(> #toolbar-menubar:is([autohide="false"],not([autohide]))) + #nav-bar{ --uc-window-drag-space-width: 0px; --uc-menubar-height: 28px; } diff --git a/chrome/combined_tabs_and_main_toolbars.css b/chrome/combined_tabs_and_main_toolbars.css index e378c17..6602068 100644 --- a/chrome/combined_tabs_and_main_toolbars.css +++ b/chrome/combined_tabs_and_main_toolbars.css @@ -10,7 +10,7 @@ See the above repository for updates as well as full license text. */ --uc-urlbar-min-width: 50vw; /* minimum width for opened urlbar */ } -#toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container{ display: none !important; } +#toolbar-menubar:not([autohide="true"],[autohide=""]) > .titlebar-buttonbox-container{ display: none !important; } #toolbar-menubar{ left:0 } @media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), @@ -28,7 +28,7 @@ See the above repository for updates as well as full license text. */ @media (-moz-platform: windows-win10){ :root[tabsintitlebar="true"] #nav-bar{ padding-left: calc(var(--uc-hide-window-control-space,1) * 134px + 20px) !important; } } - #toolbar-menubar[autohide="true"] + #TabsToolbar .titlebar-buttonbox{ flex-direction: row-reverse } + #toolbar-menubar:not([autohide="true"],[autohide=""]) + #TabsToolbar .titlebar-buttonbox{ flex-direction: row-reverse } } #navigator-toolbox{ --tab-min-height: 40px } diff --git a/chrome/hide_tabs_toolbar.css b/chrome/hide_tabs_toolbar.css index a2d6140..8b9aa2e 100644 --- a/chrome/hide_tabs_toolbar.css +++ b/chrome/hide_tabs_toolbar.css @@ -39,7 +39,7 @@ Window controls will be all wrong without it position: relative; } -#toolbar-menubar[autohide="false"]{ +#toolbar-menubar:is([autohide="false"],not([autohide])){ margin-bottom: var(--uc-toolbar-height,0px) } diff --git a/chrome/hide_tabs_toolbar_v2.css b/chrome/hide_tabs_toolbar_v2.css index 83b26a5..b91a04c 100644 --- a/chrome/hide_tabs_toolbar_v2.css +++ b/chrome/hide_tabs_toolbar_v2.css @@ -26,7 +26,7 @@ See the above repository for updates as well as full license text. */ :root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{ display: flex !important; } - :root:is([tabsintitlebar],[customtitlebar]) #toolbar-menubar:not([autohide="false"]) ~ #nav-bar{ + :root:is([tabsintitlebar],[customtitlebar]) #toolbar-menubar:is([autohide=""],not([autohide="false"])) ~ #nav-bar{ > .titlebar-buttonbox-container{ display: flex !important; } diff --git a/chrome/hide_tabs_with_one_tab.css b/chrome/hide_tabs_with_one_tab.css index 66bbeaf..bbabe4e 100644 --- a/chrome/hide_tabs_with_one_tab.css +++ b/chrome/hide_tabs_with_one_tab.css @@ -35,7 +35,7 @@ This will NOT work correctly if you have hidden tabs such as with tab groups ext } /* Fix window controls not being clickable */ -:root[tabsintitlebar] #toolbar-menubar[autohide="true"][inactive]{ +:root[tabsintitlebar] #toolbar-menubar:not([autohide="true"],[autohide=""])[inactive]{ transition: height 0ms steps(1) 80ms; } :where(#nav-bar){ diff --git a/chrome/oneline_toolbar.css b/chrome/oneline_toolbar.css index 8a7aa1f..ba4bbcd 100644 --- a/chrome/oneline_toolbar.css +++ b/chrome/oneline_toolbar.css @@ -59,7 +59,7 @@ See the above repository for updates as well as full license text. */ :root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{ display: flex !important; } - :root:is([tabsintitlebar],[customtitlebar]) :where(#toolbar-menubar:not([autohide="false"])){ + :root:is([tabsintitlebar],[customtitlebar]) :where(#toolbar-menubar:is([autohide=""],not([autohide="false"]))){ + #TabsToolbar{ :root[sizemode="normal"] & { > .titlebar-spacer[type="post-tabs"]{ @@ -79,7 +79,7 @@ See the above repository for updates as well as full license text. */ :root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container{ display: flex !important; } - :root:is([tabsintitlebar],[customtitlebar]) :where(#toolbar-menubar:not([autohide="false"])){ + :root:is([tabsintitlebar],[customtitlebar]) :where(#toolbar-menubar:is([autohide=""],not([autohide="false"]))){ + #TabsToolbar > :is(.titlebar-buttonbox-container,.titlebar-spacer[type="post-tabs"]){ display: flex !important; } @@ -100,7 +100,7 @@ See the above repository for updates as well as full license text. */ :root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container{ display: flex !important; } - :root:is([tabsintitlebar],[customtitlebar]) :where(#toolbar-menubar:not([autohide="false"])){ + :root:is([tabsintitlebar],[customtitlebar]) :where(#toolbar-menubar:is([autohide=""],not([autohide="false"]))){ + #TabsToolbar > :is(.titlebar-buttonbox-container,.titlebar-spacer[type="pre-tabs"]){ display: flex !important; } @@ -118,7 +118,7 @@ See the above repository for updates as well as full license text. */ :root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{ display: flex !important; } - :root:is([tabsintitlebar],[customtitlebar]) :where(#toolbar-menubar:not([autohide="false"])){ + :root:is([tabsintitlebar],[customtitlebar]) :where(#toolbar-menubar:is([autohide=""],not([autohide="false"]))){ :root[sizemode="normal"] & { + #TabsToolbar > .titlebar-spacer[type="pre-tabs"]{ display: flex !important; diff --git a/chrome/overlay_menubar.css b/chrome/overlay_menubar.css index 7f4f928..74232c3 100644 --- a/chrome/overlay_menubar.css +++ b/chrome/overlay_menubar.css @@ -12,7 +12,7 @@ See the above repository for updates as well as full license text. */ z-index: 10; } -#toolbar-menubar[autohide="true"][inactive="true"]{ height: 0px !important; } +#toolbar-menubar:not([autohide="true"],[autohide=""])[inactive="true"]{ height: 0px !important; } #toolbar-menubar > spacer{ flex-grow: 1 } #toolbar-menubar[inactive] > .titlebar-buttonbox-container{ display: none } @@ -35,5 +35,5 @@ See the above repository for updates as well as full license text. */ } @media (-moz-gtk-csd-reversed-placement){ - #toolbar-menubar[autohide="true"]:not([inactive]) > .titlebar-buttonbox-container{ display: none } + #toolbar-menubar:not([autohide="true"],[autohide=""]):not([inactive]) > .titlebar-buttonbox-container{ display: none } } diff --git a/chrome/selected_tab_as_urlbar.css b/chrome/selected_tab_as_urlbar.css index c113fd7..175422c 100644 --- a/chrome/selected_tab_as_urlbar.css +++ b/chrome/selected_tab_as_urlbar.css @@ -115,6 +115,6 @@ See the above repository for updates as well as full license text. */ background-color: transparent !important; } -:root:is([tabsintitlebar],[customtitlebar]) #titlebar:has(> [autohide="false"]) + #nav-bar{ +:root:is([tabsintitlebar],[customtitlebar]) #titlebar:has(> #toolbar-menubar:is([autohide="false"],not([autohide]))) + #nav-bar{ border-inline-width: 0 !important; } diff --git a/chrome/tabs_below_content_v2.css b/chrome/tabs_below_content_v2.css index 40c7946..0500e93 100644 --- a/chrome/tabs_below_content_v2.css +++ b/chrome/tabs_below_content_v2.css @@ -41,7 +41,7 @@ See the above repository for updates as well as full license text. */ :root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{ display: flex !important; } - :root:is([tabsintitlebar],[customtitlebar]) #toolbar-menubar:not([autohide="false"]) ~ #nav-bar{ + :root:is([tabsintitlebar],[customtitlebar]) #toolbar-menubar:is([autohide=""],not([autohide="false"])) ~ #nav-bar{ > .titlebar-buttonbox-container{ display: flex !important; } diff --git a/chrome/tabs_on_bottom_v2.css b/chrome/tabs_on_bottom_v2.css index c6bd69e..26abe70 100644 --- a/chrome/tabs_on_bottom_v2.css +++ b/chrome/tabs_on_bottom_v2.css @@ -26,7 +26,7 @@ See the above repository for updates as well as full license text. */ :root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{ display: flex !important; } - :root:is([tabsintitlebar],[customtitlebar]) #toolbar-menubar:not([autohide="false"]) ~ #nav-bar{ + :root:is([tabsintitlebar],[customtitlebar]) #toolbar-menubar:is([autohide=""],not([autohide="false"])) ~ #nav-bar{ > .titlebar-buttonbox-container{ display: flex !important; } diff --git a/chrome/toggle_tabs_toolbar_with_alt.css b/chrome/toggle_tabs_toolbar_with_alt.css index a752cdf..a4d69f9 100644 --- a/chrome/toggle_tabs_toolbar_with_alt.css +++ b/chrome/toggle_tabs_toolbar_with_alt.css @@ -4,7 +4,7 @@ See the above repository for updates as well as full license text. */ /* Show tabs toolbar with Alt-key. Menubar must be disabled for this to work. * To show window controls and/or menubar hit Alt again while cursor is over tabs toolbar */ -:where(#titlebar:not(:hover) > #toolbar-menubar[autohide="true"][inactive]) + #TabsToolbar { +:where(#titlebar:not(:hover) > #toolbar-menubar:not([autohide="true"],[autohide=""])[inactive]) + #TabsToolbar { visibility: collapse; } #toolbar-menubar[autohide]:not([inactive]), @@ -12,8 +12,8 @@ See the above repository for updates as well as full license text. */ visibility: collapse !important; } #menubar-items:has([_moz-menuactive][open="true"]), -#toolbar-menubar[autohide]:hover > #menubar-items, -:root:not([sizemode="fullscreen"]) #titlebar:hover #toolbar-menubar[autohide][inactive] > #menubar-items{ +#toolbar-menubar:not([autohide="true"],[autohide=""]):hover > #menubar-items, +:root:not([sizemode="fullscreen"]) #titlebar:hover #toolbar-menubar:not([autohide="true"],[autohide=""])[inactive] > #menubar-items{ visibility: visible; position: absolute; z-index: 1; diff --git a/chrome/vertical_popup_menubar.css b/chrome/vertical_popup_menubar.css index 95379b8..7a3a67c 100644 --- a/chrome/vertical_popup_menubar.css +++ b/chrome/vertical_popup_menubar.css @@ -14,7 +14,7 @@ See the above repository for updates as well as full license text. */ #main-menubar > menu{visibility: collapse; transition: visibility 0ms linear 0.1s} #main-menubar:hover > menu, -#toolbar-menubar[autohide="true"]:not([inactive]) > #menubar-items > #main-menubar > menu{visibility: visible} +#toolbar-menubar:not([autohide="true"],[autohide=""]):not([inactive]) > #menubar-items > #main-menubar > menu{visibility: visible} :root:not([customizing],[sizemode="fullscreen"]) #menubar-items{ display: block; @@ -33,11 +33,11 @@ See the above repository for updates as well as full license text. */ #main-menubar > menu > menupopup{ margin: calc(0px - var(--uc-menubaritem-height)) 0 0 var(--uc-menubaritem-width); } -#toolbar-menubar[autohide="true"][inactive] > #menubar-items{ +#toolbar-menubar:not([autohide="true"],[autohide=""])[inactive] > #menubar-items{ max-height: 0px; overflow: hidden; } -#toolbar-menubar[autohide="true"]:not([inactive]){ +#toolbar-menubar:not([autohide="true"],[autohide=""]):not([inactive]){ margin-bottom: calc(0px - var(--tab-min-height) + var(--tabs-navbar-shadow-size)); } #toolbar-menubar > .titlebar-buttonbox-container + :is(toolbarbutton,toolbaritem){ diff --git a/chrome/vertical_tabs.css b/chrome/vertical_tabs.css index 7259faf..7d9ee51 100644 --- a/chrome/vertical_tabs.css +++ b/chrome/vertical_tabs.css @@ -57,7 +57,7 @@ See the above repository for updates as well as full license text. */ right: 0; } } -:root:not([customizing]) #toolbar-menubar[autohide="false"] + #TabsToolbar #tabbrowser-tabs{ +:root:not([customizing]) #toolbar-menubar:is([autohide="false"],not([autohide])) + #TabsToolbar #tabbrowser-tabs{ height: calc(100vh - 28px); /* 28px is however tall your menubar is */ } :root:not([customizing]) #TabsToolbar #new-tab-button,