Support [autohide] as boolean attribute

Firefox 143 uses authide as boolean attribute, so we need to support
both versions, thus selectors looking mildly horrifying
This commit is contained in:
MrOtherGuy
2025-09-18 17:06:31 +03:00
parent 41e003708f
commit 9e39c99f50
16 changed files with 26 additions and 26 deletions

View File

@@ -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. * density settings and whether or not menubar is enabled.
*/ */
@media (min-resolution: 120dpi){ @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; --uc-toolbox-browser-area-overlap: -0.5px;
} }
} }

View File

@@ -79,7 +79,7 @@ See the above repository for updates as well as full license text. */
#nav-bar.browser-titlebar{ #nav-bar.browser-titlebar{
background: inherit; 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 */ background-position-y: -28px; /* best guess, could vary */
border-top: none !important; border-top: none !important;
} }

View File

@@ -63,7 +63,7 @@ See the above repository for updates as well as full license text. */
} }
#toolbar-menubar, #toolbar-menubar,
#toolbar-menubar[autohide="true"] + #TabsToolbar{ #toolbar-menubar:is([autohide="true"],[autohide=""]) + #TabsToolbar{
padding-left: 94px !important; padding-left: 94px !important;
} }

View File

@@ -23,8 +23,8 @@ See the above repository for updates as well as full license text. */
:root:is([sizemode="maximized"],[sizemode="fullscreen"]){ :root:is([sizemode="maximized"],[sizemode="fullscreen"]){
--uc-window-drag-space-width: 0px; --uc-window-drag-space-width: 0px;
} }
#toolbar-menubar[autohide="false"] ~ #nav-bar, #toolbar-menubar:is([autohide="false"],not([autohide])) ~ #nav-bar,
#titlebar:has(> [autohide="false"]) + #nav-bar{ #titlebar:has(> #toolbar-menubar:is([autohide="false"],not([autohide]))) + #nav-bar{
--uc-window-drag-space-width: 0px; --uc-window-drag-space-width: 0px;
--uc-menubar-height: 28px; --uc-menubar-height: 28px;
} }

View File

@@ -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 */ --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 } #toolbar-menubar{ left:0 }
@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), @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){ @media (-moz-platform: windows-win10){
:root[tabsintitlebar="true"] #nav-bar{ padding-left: calc(var(--uc-hide-window-control-space,1) * 134px + 20px) !important; } :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 } #navigator-toolbox{ --tab-min-height: 40px }

View File

@@ -39,7 +39,7 @@ Window controls will be all wrong without it
position: relative; position: relative;
} }
#toolbar-menubar[autohide="false"]{ #toolbar-menubar:is([autohide="false"],not([autohide])){
margin-bottom: var(--uc-toolbar-height,0px) margin-bottom: var(--uc-toolbar-height,0px)
} }

View File

@@ -26,7 +26,7 @@ See the above repository for updates as well as full license text. */
:root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{ :root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{
display: flex !important; 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{ > .titlebar-buttonbox-container{
display: flex !important; display: flex !important;
} }

View File

@@ -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 */ /* 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; transition: height 0ms steps(1) 80ms;
} }
:where(#nav-bar){ :where(#nav-bar){

View File

@@ -59,7 +59,7 @@ See the above repository for updates as well as full license text. */
:root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{ :root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{
display: flex !important; 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{ + #TabsToolbar{
:root[sizemode="normal"] & { :root[sizemode="normal"] & {
> .titlebar-spacer[type="post-tabs"]{ > .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{ :root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container{
display: flex !important; 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"]){ + #TabsToolbar > :is(.titlebar-buttonbox-container,.titlebar-spacer[type="post-tabs"]){
display: flex !important; 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{ :root[sizemode="fullscreen"] #TabsToolbar > .titlebar-buttonbox-container{
display: flex !important; 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"]){ + #TabsToolbar > :is(.titlebar-buttonbox-container,.titlebar-spacer[type="pre-tabs"]){
display: flex !important; 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{ :root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{
display: flex !important; 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"] & { :root[sizemode="normal"] & {
+ #TabsToolbar > .titlebar-spacer[type="pre-tabs"]{ + #TabsToolbar > .titlebar-spacer[type="pre-tabs"]{
display: flex !important; display: flex !important;

View File

@@ -12,7 +12,7 @@ See the above repository for updates as well as full license text. */
z-index: 10; 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 > spacer{ flex-grow: 1 }
#toolbar-menubar[inactive] > .titlebar-buttonbox-container{ display: none } #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){ @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 }
} }

View File

@@ -115,6 +115,6 @@ See the above repository for updates as well as full license text. */
background-color: transparent !important; 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; border-inline-width: 0 !important;
} }

View File

@@ -41,7 +41,7 @@ See the above repository for updates as well as full license text. */
:root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{ :root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{
display: flex !important; 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{ > .titlebar-buttonbox-container{
display: flex !important; display: flex !important;
} }

View File

@@ -26,7 +26,7 @@ See the above repository for updates as well as full license text. */
:root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{ :root[sizemode="fullscreen"] #nav-bar > .titlebar-buttonbox-container{
display: flex !important; 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{ > .titlebar-buttonbox-container{
display: flex !important; display: flex !important;
} }

View File

@@ -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. /* 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 */ * 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; visibility: collapse;
} }
#toolbar-menubar[autohide]:not([inactive]), #toolbar-menubar[autohide]:not([inactive]),
@@ -12,8 +12,8 @@ See the above repository for updates as well as full license text. */
visibility: collapse !important; visibility: collapse !important;
} }
#menubar-items:has([_moz-menuactive][open="true"]), #menubar-items:has([_moz-menuactive][open="true"]),
#toolbar-menubar[autohide]:hover > #menubar-items, #toolbar-menubar:not([autohide="true"],[autohide=""]):hover > #menubar-items,
:root:not([sizemode="fullscreen"]) #titlebar:hover #toolbar-menubar[autohide][inactive] > #menubar-items{ :root:not([sizemode="fullscreen"]) #titlebar:hover #toolbar-menubar:not([autohide="true"],[autohide=""])[inactive] > #menubar-items{
visibility: visible; visibility: visible;
position: absolute; position: absolute;
z-index: 1; z-index: 1;

View File

@@ -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 > menu{visibility: collapse; transition: visibility 0ms linear 0.1s}
#main-menubar:hover > menu, #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{ :root:not([customizing],[sizemode="fullscreen"]) #menubar-items{
display: block; display: block;
@@ -33,11 +33,11 @@ See the above repository for updates as well as full license text. */
#main-menubar > menu > menupopup{ #main-menubar > menu > menupopup{
margin: calc(0px - var(--uc-menubaritem-height)) 0 0 var(--uc-menubaritem-width); 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; max-height: 0px;
overflow: hidden; 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)); margin-bottom: calc(0px - var(--tab-min-height) + var(--tabs-navbar-shadow-size));
} }
#toolbar-menubar > .titlebar-buttonbox-container + :is(toolbarbutton,toolbaritem){ #toolbar-menubar > .titlebar-buttonbox-container + :is(toolbarbutton,toolbaritem){

View File

@@ -57,7 +57,7 @@ See the above repository for updates as well as full license text. */
right: 0; 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 */ height: calc(100vh - 28px); /* 28px is however tall your menubar is */
} }
:root:not([customizing]) #TabsToolbar #new-tab-button, :root:not([customizing]) #TabsToolbar #new-tab-button,