From 8d3c6ab4fcc8ffd55f936f2b71a10327903ce8df Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sun, 2 Nov 2025 06:45:00 +0200 Subject: [PATCH] code cleanup: remove uses of -moz-bool-pref --- chrome/autohide_bookmarks_and_main_toolbars.css | 6 ++---- chrome/autohide_bookmarks_toolbar.css | 2 +- chrome/autohide_main_toolbar.css | 3 +-- chrome/autohide_tabstoolbar_v2.css | 9 +++------ chrome/autohide_toolbox.css | 3 +-- chrome/centered_statuspanel.css | 3 +-- chrome/combined_tabs_and_main_toolbars.css | 6 ++---- chrome/curved_tabs.css | 9 +++------ chrome/fake_statusbar_w_menubar.css | 3 +-- chrome/floating_findbar_on_top.css | 3 +-- chrome/icon_only_tabs.css | 3 +-- chrome/multi-row_tabs.css | 6 ++---- chrome/overlay_fullscreen_toolbars.css | 3 +-- chrome/selected_tab_as_urlbar.css | 3 +-- chrome/tabs_below_content_v2.css | 12 ++++-------- chrome/tabs_on_bottom_v2.css | 9 +++------ chrome/toolbars_below_content_v2.css | 3 +-- chrome/vertical_menubar.css | 3 +-- chrome/vertical_tabs.css | 4 ++-- 19 files changed, 32 insertions(+), 61 deletions(-) diff --git a/chrome/autohide_bookmarks_and_main_toolbars.css b/chrome/autohide_bookmarks_and_main_toolbars.css index aa521c8..eeda8af 100644 --- a/chrome/autohide_bookmarks_and_main_toolbars.css +++ b/chrome/autohide_bookmarks_and_main_toolbars.css @@ -146,16 +146,14 @@ See the above repository for updates as well as full license text. */ margin-bottom: calc(-1px - var(--uc-bm-height) + var(--uc-navbar-height)) !important; z-index: auto !important; } -@media (-moz-bool-pref: "browser.fullscreen.autohide"), - -moz-pref("browser.fullscreen.autohide"){ +@media -moz-pref("browser.fullscreen.autohide"){ :root[sizemode="fullscreen"] #navigator-toolbox[style*="margin-top"]{ margin-top: calc(1px - var(--tab-min-height) - 2 * var(--tab-block-margin)) !important; } } /* Set the following pref to enable compatibility with multi-row_bookmarks.css */ -@media (-moz-bool-pref: "userchrome.autohide-bm-and-main-toolbars.multirow-bookmarks-compat.enabled"), - -moz-pref("userchrome.autohide-bm-and-main-toolbars.multirow-bookmarks-compat.enabled"){ +@media -moz-pref("userchrome.autohide-bm-and-main-toolbars.multirow-bookmarks-compat.enabled"){ #navigator-toolbox{ margin-bottom: var(--uc-navbar-height) !important; } #PersonalToolbar:not([customizing]){ min-height: 0 !important; diff --git a/chrome/autohide_bookmarks_toolbar.css b/chrome/autohide_bookmarks_toolbar.css index c48ebc4..8f47a27 100644 --- a/chrome/autohide_bookmarks_toolbar.css +++ b/chrome/autohide_bookmarks_toolbar.css @@ -29,7 +29,7 @@ See the above repository for updates as well as full license text. */ background-position-y:top,top,var(--uc-bg-y),var(--uc-bg-y),var(--uc-bg-y); background-image: var(--toolbar-bgimage,linear-gradient(transparent,transparent)), linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)),var(--lwt-header-image,var(--lwt-additional-images)) !important; } -@media (-moz-bool-pref: "sidebar.verticalTabs"), -moz-pref("sidebar.verticalTabs"){ +@media -moz-pref("sidebar.verticalTabs"){ #PersonalToolbar{ --toolbar-bgcolor: transparent; } diff --git a/chrome/autohide_main_toolbar.css b/chrome/autohide_main_toolbar.css index 478978a..0e3b60e 100644 --- a/chrome/autohide_main_toolbar.css +++ b/chrome/autohide_main_toolbar.css @@ -89,8 +89,7 @@ See the above repository for updates as well as full license text. */ :root[sessionrestored]:not([chromehidden~="toolbar"]) > body > #browser{ margin-top: var(--uc-navbar-transform); } -@media -moz-pref("browser.fullscreen.autohide"), - (-moz-bool-pref: "browser.fullscreen.autohide"){ +@media -moz-pref("browser.fullscreen.autohide"){ :root[sessionrestored][sizemode="fullscreen"] > body > #browser{ margin-top: revert; } diff --git a/chrome/autohide_tabstoolbar_v2.css b/chrome/autohide_tabstoolbar_v2.css index 7e7b2e5..493a634 100644 --- a/chrome/autohide_tabstoolbar_v2.css +++ b/chrome/autohide_tabstoolbar_v2.css @@ -8,8 +8,7 @@ See the above repository for updates as well as full license text. */ --uc-tabs-hide-animation-delay: 200ms; } -@media (-moz-bool-pref: "sidebar.verticalTabs"), - -moz-pref("sidebar.verticalTabs"){ +@media -moz-pref("sidebar.verticalTabs"){ #sidebar-main{ overflow: visible !important; max-width: var(--tab-collapsed-width) !important; @@ -42,8 +41,7 @@ See the above repository for updates as well as full license text. */ background: inherit; } } -@media not (-moz-bool-pref: "sidebar.verticalTabs"), - not -moz-pref("sidebar.verticalTabs"){ +@media not -moz-pref("sidebar.verticalTabs"){ :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)); @@ -79,8 +77,7 @@ See the above repository for updates as well as full license text. */ transition-delay: 0ms, 0ms !important; } } - @media (-moz-bool-pref: "userchrome.autohidetabs.show-while-inactive.enabled"), - -moz-pref("userchrome.autohidetabs.show-while-inactive.enabled"){ + @media -moz-pref("userchrome.autohidetabs.show-while-inactive.enabled"){ #navigator-toolbox:-moz-window-inactive{ margin-bottom: calc(0px - 2 * var(--tab-block-margin) - var(--tab-min-height)); > #TabsToolbar{ diff --git a/chrome/autohide_toolbox.css b/chrome/autohide_toolbox.css index 9e22cb0..66afed3 100644 --- a/chrome/autohide_toolbox.css +++ b/chrome/autohide_toolbox.css @@ -64,8 +64,7 @@ See the above repository for updates as well as full license text. */ /* This makes things like OS menubar/taskbar show the toolbox when hovered in maximized windows. * Unfortunately it also means that other OS native surfaces (such as context menu on macos) * and other always-on-top applications will trigger toolbox to show up. */ -@media (-moz-bool-pref: "userchrome.autohide-toolbox.unhide-by-native-ui.enabled"), - -moz-pref("userchrome.autohide-toolbox.unhide-by-native-ui.enabled"){ +@media -moz-pref("userchrome.autohide-toolbox.unhide-by-native-ui.enabled"){ :root[sizemode="maximized"]:not(:hover){ #navigator-toolbox:not(:-moz-window-inactive), #urlbar[popover]:not(:-moz-window-inactive){ diff --git a/chrome/centered_statuspanel.css b/chrome/centered_statuspanel.css index 7d5fcf3..236ac71 100644 --- a/chrome/centered_statuspanel.css +++ b/chrome/centered_statuspanel.css @@ -14,8 +14,7 @@ See the above repository for updates as well as full license text. */ margin-inline: auto !important; } /* Set this pref to true in about:config to make statuspanel show at top instead */ -@media (-moz-bool-pref: "userchrome.centered-statuspanel.on-top.enabled"), - -moz-pref("userchrome.centered-statuspanel.on-top.enabled"){ +@media -moz-pref("userchrome.centered-statuspanel.on-top.enabled"){ #statuspanel:not([hidden]){ inset-block: 0 auto !important; } diff --git a/chrome/combined_tabs_and_main_toolbars.css b/chrome/combined_tabs_and_main_toolbars.css index 93aa218..46e5601 100644 --- a/chrome/combined_tabs_and_main_toolbars.css +++ b/chrome/combined_tabs_and_main_toolbars.css @@ -13,8 +13,7 @@ See the above repository for updates as well as full license text. */ #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"), - -moz-pref("userchrome.force-window-controls-on-left.enabled"), +@media -moz-pref("userchrome.force-window-controls-on-left.enabled"), (-moz-gtk-csd-reversed-placement), (-moz-platform: macos){ #TabsToolbar > .titlebar-buttonbox-container{ @@ -66,8 +65,7 @@ See the above repository for updates as well as full license text. */ #urlbar[open]:focus-within{ min-width: var(--uc-urlbar-min-width,none) !important; } /* Set this pref if you want unpinned tabs to become hidden unless selected */ -@media (-moz-bool-pref: "userchrome.hide-unpinned-tabs.enabled"), - -moz-pref("userchrome.hide-unpinned-tabs.enabled"){ +@media -moz-pref("userchrome.hide-unpinned-tabs.enabled"){ #alltabs-button{ display: flex !important } .tabbrowser-tab:not([pinned]):not([selected]){ visibility: collapse } } diff --git a/chrome/curved_tabs.css b/chrome/curved_tabs.css index ce1e549..e5c7e31 100644 --- a/chrome/curved_tabs.css +++ b/chrome/curved_tabs.css @@ -121,8 +121,7 @@ tab-group[collapsed] > .tabbrowser-tab{ /* OPTIONAL - COLORS - show tabs border, selected tab line and make selected tab match the main toolbar color. Also disables tab shadow */ /* Using these color options requires you to set layout.css.color-mix.enabled to true in about:config */ -@media (-moz-bool-pref: "userchrome.curved_tabs.extra-border.enabled"), - -moz-pref("userchrome.curved_tabs.extra-border.enabled"){ +@media -moz-pref("userchrome.curved_tabs.extra-border.enabled"){ #navigator-toolbox{ --lwt-tabs-border-color: color-mix(in srgb, currentcolor, white 50%) !important; } :root[lwtheme-brighttext] #navigator-toolbox{ --lwt-tabs-border-color: color-mix(in srgb, currentcolor, black 50%) !important; } #tabbrowser-tabs{ --lwt-selected-tab-background-color: var(--toolbar-bgcolor) } @@ -153,8 +152,7 @@ tab-group[collapsed] > .tabbrowser-tab{ } /* OPTIONAL - Make some of the buttons in tabs toolbar rounded, which might look nicer especially with large curve size */ -@media (-moz-bool-pref: "userchrome.curved_tabs.round-buttons.enabled"), - -moz-pref("userchrome.curved_tabs.round-buttons.enabled"){ +@media -moz-pref("userchrome.curved_tabs.round-buttons.enabled"){ #tabs-newtab-button > .toolbarbutton-icon, #TabsToolbar #new-tab-button > .toolbarbutton-icon, #alltabs-button > .toolbarbutton-badge-stack, @@ -162,8 +160,7 @@ tab-group[collapsed] > .tabbrowser-tab{ } /* OPTIONAL - uncomment the following to flip the curves vertically - maybe useful for tabs on bottom ? */ -@media (-moz-bool-pref: "userchrome.curved_tabs.flipped-curve.enabled"), - -moz-pref("userchrome.curved_tabs.flipped-curve.enabled"){ +@media -moz-pref("userchrome.curved_tabs.flipped-curve.enabled"){ .tab-background{ flex-direction: column-reverse } .tabbrowser-tab:hover > .tab-stack > .tab-background, .tab-background[selected]{ border-radius: 0 0 var(--uc-tab-curve-size) var(--uc-tab-curve-size) !important } diff --git a/chrome/fake_statusbar_w_menubar.css b/chrome/fake_statusbar_w_menubar.css index 52c369f..8347d56 100644 --- a/chrome/fake_statusbar_w_menubar.css +++ b/chrome/fake_statusbar_w_menubar.css @@ -87,8 +87,7 @@ See the above repository for updates as well as full license text. */ .browserSidebarContainer{ background-color: inherit; } - @media (-moz-bool-pref:"userchrome.fake_statusbar_w_menubar-tabs_below_content.compat.enabled"), - -moz-pref("userchrome.fake_statusbar_w_menubar-tabs_below_content.compat.enabled"){ + @media -moz-pref("userchrome.fake_statusbar_w_menubar-tabs_below_content.compat.enabled"){ #toolbar-menubar{ grid-row: 11/12; background-attachment: scroll; diff --git a/chrome/floating_findbar_on_top.css b/chrome/floating_findbar_on_top.css index b159b88..49c4e22 100644 --- a/chrome/floating_findbar_on_top.css +++ b/chrome/floating_findbar_on_top.css @@ -72,8 +72,7 @@ findbar::after{ flex-grow: 100; } -@media (-moz-bool-pref: "userchrome.floating-findbar-on-right.enabled"), - -moz-pref("userchrome.floating-findbar-on-right.enabled"){ +@media -moz-pref("userchrome.floating-findbar-on-right.enabled"){ findbar{ flex-direction: row-reverse; } diff --git a/chrome/icon_only_tabs.css b/chrome/icon_only_tabs.css index 03fb2f2..c2c9e88 100644 --- a/chrome/icon_only_tabs.css +++ b/chrome/icon_only_tabs.css @@ -1,8 +1,7 @@ /* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/icon_only_tabs.css made available under Mozilla Public License v. 2.0 See the above repository for updates as well as full license text. */ -@media not (-moz-bool-pref: "sidebar.verticalTabs"), - not -moz-pref("sidebar.verticalTabs"){ +@media not -moz-pref("sidebar.verticalTabs"){ .tab-content > :not(.tab-icon-stack){ display: none; } diff --git a/chrome/multi-row_tabs.css b/chrome/multi-row_tabs.css index 945f3b6..351170c 100644 --- a/chrome/multi-row_tabs.css +++ b/chrome/multi-row_tabs.css @@ -70,12 +70,10 @@ See the above repository for updates as well as full license text. */ #tabbrowser-arrowscrollbox > spacer, .tabbrowser-tab::after{ display: none !important } -@media (-moz-bool-pref: "userchrome.multirowtabs.full-width-tabs.enabled"), - -moz-pref("userchrome.multirowtabs.full-width-tabs.enabled"){ +@media -moz-pref("userchrome.multirowtabs.full-width-tabs.enabled"){ .tabbrowser-tab[fadein]:not([pinned]){ max-width: 100vw !important; } } -@media (-moz-bool-pref: "userchrome.multirowtabs.scrollbar-handle.enabled"), - -moz-pref( "userchrome.multirowtabs.scrollbar-handle.enabled"){ +@media -moz-pref( "userchrome.multirowtabs.scrollbar-handle.enabled"){ #tabbrowser-arrowscrollbox{ -moz-window-dragging: no-drag } } diff --git a/chrome/overlay_fullscreen_toolbars.css b/chrome/overlay_fullscreen_toolbars.css index b667421..5881c02 100644 --- a/chrome/overlay_fullscreen_toolbars.css +++ b/chrome/overlay_fullscreen_toolbars.css @@ -3,8 +3,7 @@ See the above repository for updates as well as full license text. */ /* Makes toolbars appear as overlay instead of pushing down the website in fullscreen mode */ -@media (-moz-bool-pref: "browser.fullscreen.autohide"), - -moz-pref("browser.fullscreen.autohide"){ +@media -moz-pref("browser.fullscreen.autohide"){ :root{ --uc-fullscreen-overlay-duration: 82ms; --uc-fullscreen-overlay-delay: 600ms; diff --git a/chrome/selected_tab_as_urlbar.css b/chrome/selected_tab_as_urlbar.css index 31f9c8d..54d41b6 100644 --- a/chrome/selected_tab_as_urlbar.css +++ b/chrome/selected_tab_as_urlbar.css @@ -98,8 +98,7 @@ See the above repository for updates as well as full license text. */ /* By default this style moves your back and forward buttons to the left edge of the navbar and adds a placeholder space for them. Set the following pref to false to disable that behavior */ -@media (-moz-bool-pref: "userchrome.selected-tab-as-urlbar.nav-buttons-space.disabled"), - -moz-pref("userchrome.selected-tab-as-urlbar.nav-buttons-space.disabled"){ +@media -moz-pref("userchrome.selected-tab-as-urlbar.nav-buttons-space.disabled"){ #TabsToolbar > .toolbar-items{ margin-left: 0px !important; } #nav-bar-customization-target{ margin-left: 0px !important; } #back-button, #forward-button{ diff --git a/chrome/tabs_below_content_v2.css b/chrome/tabs_below_content_v2.css index 8aa5e15..33ba5cc 100644 --- a/chrome/tabs_below_content_v2.css +++ b/chrome/tabs_below_content_v2.css @@ -2,8 +2,7 @@ See the above repository for updates as well as full license text. */ /* Requires Fx 133+ */ -@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), - -moz-pref("userchrome.force-window-controls-on-left.enabled"){ +@media -moz-pref("userchrome.force-window-controls-on-left.enabled"){ #nav-bar > .titlebar-buttonbox-container{ order: -1 !important; > .titlebar-buttonbox{ @@ -11,8 +10,7 @@ See the above repository for updates as well as full license text. */ } } } -@media not (-moz-bool-pref: "sidebar.verticalTabs"), - not -moz-pref("sidebar.verticalTabs"){ +@media not -moz-pref("sidebar.verticalTabs"){ #main-window > body{ display: grid !important; grid-template-rows: repeat(8,max-content) 1fr; @@ -55,8 +53,7 @@ See the above repository for updates as well as full license text. */ display: flex !important; } } - @media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), - -moz-pref("userchrome.force-window-controls-on-left.enabled"), + @media -moz-pref("userchrome.force-window-controls-on-left.enabled"), (-moz-gtk-csd-reversed-placement), (-moz-platform: macos){ > .titlebar-spacer[type="post-tabs"]{ @@ -67,8 +64,7 @@ See the above repository for updates as well as full license text. */ } } } - @media (-moz-bool-pref: "browser.fullscreen.autohide"), - -moz-pref("browser.fullscreen.autohide"){ + @media -moz-pref("browser.fullscreen.autohide"){ #main-window[sizemode="fullscreen"]:not([inDOMFullscreen]){ > body { grid-template-rows: repeat(8,0px) 1fr; diff --git a/chrome/tabs_on_bottom_v2.css b/chrome/tabs_on_bottom_v2.css index ca14895..89eeaad 100644 --- a/chrome/tabs_on_bottom_v2.css +++ b/chrome/tabs_on_bottom_v2.css @@ -3,8 +3,7 @@ See the above repository for updates as well as full license text. */ /* This reorders toolbar to place tabs below other toolbars. Requires Firefox 133+ */ -@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), - -moz-pref("userchrome.force-window-controls-on-left.enabled"){ +@media -moz-pref("userchrome.force-window-controls-on-left.enabled"){ #nav-bar > .titlebar-buttonbox-container{ order: -1 !important; > .titlebar-buttonbox{ @@ -12,8 +11,7 @@ See the above repository for updates as well as full license text. */ } } } -@media not (-moz-bool-pref: "sidebar.verticalTabs"), - not -moz-pref("sidebar.verticalTabs"){ +@media not -moz-pref("sidebar.verticalTabs"){ .global-notificationbox, #tab-notification-deck, #notifications-toolbar, @@ -39,8 +37,7 @@ See the above repository for updates as well as full license text. */ > .titlebar-spacer[type="post-tabs"]{ display: flex !important; } - @media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), - -moz-pref("userchrome.force-window-controls-on-left.enabled"), + @media -moz-pref("userchrome.force-window-controls-on-left.enabled"), (-moz-gtk-csd-reversed-placement), (-moz-platform: macos){ > .titlebar-spacer[type="post-tabs"]{ diff --git a/chrome/toolbars_below_content_v2.css b/chrome/toolbars_below_content_v2.css index b745e9b..0edce4f 100644 --- a/chrome/toolbars_below_content_v2.css +++ b/chrome/toolbars_below_content_v2.css @@ -73,8 +73,7 @@ See the above repository for updates as well as full license text. */ } .urlbarView-body-inner{ border-top-style: none !important; } -@media (-moz-bool-pref: "userchrome.toolbars-below-content.tabs-at-bottom.enabled"), - -moz-pref("userchrome.toolbars-below-content.tabs-at-bottom.enabled"){ +@media -moz-pref("userchrome.toolbars-below-content.tabs-at-bottom.enabled"){ #TabsToolbar{ order: 3 } diff --git a/chrome/vertical_menubar.css b/chrome/vertical_menubar.css index 2810da9..e185575 100644 --- a/chrome/vertical_menubar.css +++ b/chrome/vertical_menubar.css @@ -63,8 +63,7 @@ See the above repository for updates as well as full license text. */ margin-left: var(--uc-vertical-menubar-width); } - @media (-moz-bool-pref: "userchrome.vertical-menubar.on-right.enabled"), - -moz-pref("userchrome.vertical-menubar.on-right.enabled"){ + @media -moz-pref("userchrome.vertical-menubar.on-right.enabled"){ :root:not([inDOMFullscreen]) #browser{ margin-inline: 0 var(--uc-vertical-menubar-width); } diff --git a/chrome/vertical_tabs.css b/chrome/vertical_tabs.css index 8957512..3329095 100644 --- a/chrome/vertical_tabs.css +++ b/chrome/vertical_tabs.css @@ -43,7 +43,7 @@ See the above repository for updates as well as full license text. */ :root[lwtheme]:not([customizing]) #tabbrowser-tabs{ background-color: var(--lwt-accent-color,var(--toolbox-bgcolor)); } -@media (-moz-bool-pref: "userchrome.vertical-tabs.on-right.enabled"){ +@media -moz-pref("userchrome.vertical-tabs.on-right.enabled"){ #PersonalToolbar, #tab-notification-deck, #notifications-toolbar, @@ -88,7 +88,7 @@ See the above repository for updates as well as full license text. */ position: absolute; right: 0; } -@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), +@media -moz-pref("userchrome.force-window-controls-on-left.enabled"), (-moz-gtk-csd-reversed-placement), (-moz-platform: macos){ #TabsToolbar > .titlebar-buttonbox-container{