diff --git a/chrome/autohide_bookmarks_and_main_toolbars.css b/chrome/autohide_bookmarks_and_main_toolbars.css index d23d141..1d30f2c 100644 --- a/chrome/autohide_bookmarks_and_main_toolbars.css +++ b/chrome/autohide_bookmarks_and_main_toolbars.css @@ -130,14 +130,16 @@ 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"){ +@media (-moz-bool-pref: "browser.fullscreen.autohide"), + -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"){ +@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"){ #navigator-toolbox{ margin-bottom: var(--uc-navbar-height) !important; } #PersonalToolbar:not([customizing]){ min-height: 0 !important; diff --git a/chrome/autohide_tabstoolbar_v2.css b/chrome/autohide_tabstoolbar_v2.css index 5d8634d..184b3b8 100644 --- a/chrome/autohide_tabstoolbar_v2.css +++ b/chrome/autohide_tabstoolbar_v2.css @@ -8,7 +8,8 @@ See the above repository for updates as well as full license text. */ --uc-tabs-hide-animation-delay: 200ms; } -@media (-moz-bool-pref: "sidebar.verticalTabs"){ +@media (-moz-bool-pref: "sidebar.verticalTabs"), + -moz-pref("sidebar.verticalTabs"){ #sidebar-main{ overflow: visible !important; max-width: var(--tab-collapsed-width) !important; @@ -37,7 +38,8 @@ See the above repository for updates as well as full license text. */ } } } -@media not (-moz-bool-pref: "sidebar.verticalTabs"){ +@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"]) #TabsToolbar{ margin-bottom: calc(0px - 2 * var(--tab-block-margin) - var(--tab-min-height)); @@ -59,7 +61,8 @@ See the above repository for updates as well as full license text. */ transition-delay: 18ms, 0ms !important; } } - @media (-moz-bool-pref: "userchrome.autohidetabs.show-while-inactive.enabled"){ + @media (-moz-bool-pref: "userchrome.autohidetabs.show-while-inactive.enabled"), + -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 8239229..22d5620 100644 --- a/chrome/autohide_toolbox.css +++ b/chrome/autohide_toolbox.css @@ -60,7 +60,8 @@ 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"){ +@media (-moz-bool-pref: "userchrome.autohide-toolbox.unhide-by-native-ui.enabled"), + -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 497f4e7..7d5fcf3 100644 --- a/chrome/centered_statuspanel.css +++ b/chrome/centered_statuspanel.css @@ -14,7 +14,8 @@ 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"){ +@media (-moz-bool-pref: "userchrome.centered-statuspanel.on-top.enabled"), + -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 a704ac7..e378c17 100644 --- a/chrome/combined_tabs_and_main_toolbars.css +++ b/chrome/combined_tabs_and_main_toolbars.css @@ -14,6 +14,7 @@ See the above repository for updates as well as full license text. */ #toolbar-menubar{ left:0 } @media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), + -moz-pref("userchrome.force-window-controls-on-left.enabled"), (-moz-gtk-csd-reversed-placement), (-moz-platform: macos){ #TabsToolbar > .titlebar-buttonbox-container{ @@ -69,7 +70,8 @@ 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"){ +@media (-moz-bool-pref: "userchrome.hide-unpinned-tabs.enabled"), + -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 fab19d3..a2d735f 100644 --- a/chrome/curved_tabs.css +++ b/chrome/curved_tabs.css @@ -112,7 +112,8 @@ See the above repository for updates as well as full license text. */ /* 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"){ +@media (-moz-bool-pref: "userchrome.curved_tabs.extra-border.enabled"), + -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) } @@ -143,7 +144,8 @@ See the above repository for updates as well as full license text. */ } /* 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"){ +@media (-moz-bool-pref: "userchrome.curved_tabs.round-buttons.enabled"), + -moz-pref("userchrome.curved_tabs.round-buttons.enabled"){ #tabs-newtab-button > .toolbarbutton-icon, #TabsToolbar #new-tab-button > .toolbarbutton-icon, #alltabs-button > .toolbarbutton-badge-stack, @@ -151,7 +153,8 @@ See the above repository for updates as well as full license text. */ } /* 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"){ +@media (-moz-bool-pref: "userchrome.curved_tabs.flipped-curve.enabled"), + -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/floating_findbar_on_top.css b/chrome/floating_findbar_on_top.css index 0c8a05a..4b71e20 100644 --- a/chrome/floating_findbar_on_top.css +++ b/chrome/floating_findbar_on_top.css @@ -72,7 +72,8 @@ findbar::after{ flex-grow: 100; } -@media (-moz-bool-pref: "userchrome.floating-findbar-on-right.enabled"){ +@media (-moz-bool-pref: "userchrome.floating-findbar-on-right.enabled"), + -moz-pref("userchrome.floating-findbar-on-right.enabled"){ findbar{ flex-direction: row-reverse; } diff --git a/chrome/hide_tabs_toolbar_v2.css b/chrome/hide_tabs_toolbar_v2.css index 37dadb8..83b26a5 100644 --- a/chrome/hide_tabs_toolbar_v2.css +++ b/chrome/hide_tabs_toolbar_v2.css @@ -3,12 +3,14 @@ See the above repository for updates as well as full license text. */ /* This requires Firefox 133+ to work */ -@media (-moz-bool-pref: "sidebar.verticalTabs"){ +@media (-moz-bool-pref: "sidebar.verticalTabs"), + -moz-pref("sidebar.verticalTabs"){ #sidebar-main{ visibility: collapse; } } -@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"){ +@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), + -moz-pref("userchrome.force-window-controls-on-left.enabled"){ #nav-bar > .titlebar-buttonbox-container{ order: -1 !important; > .titlebar-buttonbox{ @@ -16,7 +18,8 @@ See the above repository for updates as well as full license text. */ } } } -@media not (-moz-bool-pref: "sidebar.verticalTabs"){ +@media not (-moz-bool-pref: "sidebar.verticalTabs"), + not -moz-pref("sidebar.verticalTabs"){ #TabsToolbar:not([customizing]){ visibility: collapse; } @@ -37,6 +40,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"), (-moz-gtk-csd-reversed-placement), (-moz-platform: macos){ > .titlebar-spacer[type="post-tabs"]{ diff --git a/chrome/icon_only_tabs.css b/chrome/icon_only_tabs.css index 3994221..03fb2f2 100644 --- a/chrome/icon_only_tabs.css +++ b/chrome/icon_only_tabs.css @@ -1,7 +1,8 @@ /* 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"){ +@media not (-moz-bool-pref: "sidebar.verticalTabs"), + not -moz-pref("sidebar.verticalTabs"){ .tab-content > :not(.tab-icon-stack){ display: none; } diff --git a/chrome/menupopup_forced_color_schemes.css b/chrome/menupopup_forced_color_schemes.css index a831411..25519c0 100644 --- a/chrome/menupopup_forced_color_schemes.css +++ b/chrome/menupopup_forced_color_schemes.css @@ -4,21 +4,20 @@ See the above repository for updates as well as full license text. */ /* This only works on Windows10 when the proton-style context menus are used. * Purpose of this style is to force either dark or light version of menus * regardless of the Firefox theme you have. - * This does NOTHING unless you go to about:config and create a new boolean pref - * "userchrome.menupopups.force-light" (or "-dark" for dark version) and set it true. + * This does NOTHING unless you go to about:config and create a new number pref + * "userchrome.menupopups.color-scheme" * - * If both are set true then dark version is used. - * If both are set false then normal Firefox behavior is used (so your theme selects it) - * Changes to the prefs WON'T APPLY before Firefox is restarted. -*/ + * 0 = dark + * 1 = light + */ -@media (-moz-bool-pref: "userchrome.menupopups.force-light"){ - menupopup{ - color-scheme: light !important; - } -} -@media (-moz-bool-pref: "userchrome.menupopups.force-dark"){ +@media -moz-pref("userchrome.menupopups.color-scheme",0){ menupopup{ color-scheme: dark !important; } } +@media -moz-pref("userchrome.menupopups.color-scheme",1){ + menupopup{ + color-scheme: light !important; + } +} diff --git a/chrome/multi-row_tabs.css b/chrome/multi-row_tabs.css index 9619e32..6427b40 100644 --- a/chrome/multi-row_tabs.css +++ b/chrome/multi-row_tabs.css @@ -76,9 +76,11 @@ 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"){ +@media (-moz-bool-pref: "userchrome.multirowtabs.full-width-tabs.enabled"), + -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"){ +@media (-moz-bool-pref: "userchrome.multirowtabs.scrollbar-handle.enabled"), + -moz-pref( "userchrome.multirowtabs.scrollbar-handle.enabled"){ #tabbrowser-arrowscrollbox{ -moz-window-dragging: no-drag } } \ No newline at end of file diff --git a/chrome/multi-row_tabs_below_content.css b/chrome/multi-row_tabs_below_content.css index 62c8ffd..1f80983 100644 --- a/chrome/multi-row_tabs_below_content.css +++ b/chrome/multi-row_tabs_below_content.css @@ -243,7 +243,8 @@ See the above repository for updates as well as full license text. */ margin-bottom: 0 !important; z-index: auto !important; } - @media (-moz-bool-pref: "userchrome.multirowtabs.static-menubar.enabled"){ + @media (-moz-bool-pref: "userchrome.multirowtabs.static-menubar.enabled"), + -moz-pref( "userchrome.multirowtabs.static-menubar.enabled"){ :root:not([sizemode="fullscreen"]){ --multirow-menubar-height: 28px; --uc-window-drag-space-width: 0px; @@ -280,7 +281,8 @@ See the above repository for updates as well as full license text. */ top: calc(var(--multirow-toolbar-height) + var(--multirow-top-padding) + var(--multirow-menubar-height)); } } - @media (-moz-bool-pref: "userchrome.multi-row-tabs.full-width-tabs.enabled"){ + @media (-moz-bool-pref: "userchrome.multi-row-tabs.full-width-tabs.enabled"), + -moz-pref("userchrome.multi-row-tabs.full-width-tabs.enabled"){ .tabbrowser-tab[fadein]:not([pinned]){ max-width: 100vw !important; } } } diff --git a/chrome/overlay_fullscreen_toolbars.css b/chrome/overlay_fullscreen_toolbars.css index f7b8478..d9b1aa1 100644 --- a/chrome/overlay_fullscreen_toolbars.css +++ b/chrome/overlay_fullscreen_toolbars.css @@ -3,7 +3,8 @@ 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"){ +@media (-moz-bool-pref: "browser.fullscreen.autohide"), + -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 18ce513..f08574f 100644 --- a/chrome/selected_tab_as_urlbar.css +++ b/chrome/selected_tab_as_urlbar.css @@ -98,7 +98,8 @@ 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"){ +@media (-moz-bool-pref: "userchrome.selected-tab-as-urlbar.nav-buttons-space.disabled"), + -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 70fda08..b42c627 100644 --- a/chrome/tabs_below_content_v2.css +++ b/chrome/tabs_below_content_v2.css @@ -2,7 +2,8 @@ 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"){ +@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), + -moz-pref("userchrome.force-window-controls-on-left.enabled"){ #nav-bar > .titlebar-buttonbox-container{ order: -1 !important; > .titlebar-buttonbox{ @@ -10,7 +11,8 @@ See the above repository for updates as well as full license text. */ } } } -@media not (-moz-bool-pref: "sidebar.verticalTabs"){ +@media not (-moz-bool-pref: "sidebar.verticalTabs"), + not -moz-pref("sidebar.verticalTabs"){ #main-window > body{ display: grid !important; grid-template-rows: repeat(8,max-content) 1fr; @@ -54,6 +56,7 @@ See the above repository for updates as well as full license text. */ } } @media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), + -moz-pref("userchrome.force-window-controls-on-left.enabled"), (-moz-gtk-csd-reversed-placement), (-moz-platform: macos){ > .titlebar-spacer[type="post-tabs"]{ @@ -64,7 +67,8 @@ See the above repository for updates as well as full license text. */ } } } - @media (-moz-bool-pref: "browser.fullscreen.autohide"){ + @media (-moz-bool-pref: "browser.fullscreen.autohide"), + -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 dd57762..06cd2bb 100644 --- a/chrome/tabs_on_bottom_v2.css +++ b/chrome/tabs_on_bottom_v2.css @@ -3,7 +3,8 @@ 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"){ +@media (-moz-bool-pref: "userchrome.force-window-controls-on-left.enabled"), + -moz-pref("userchrome.force-window-controls-on-left.enabled"){ #nav-bar > .titlebar-buttonbox-container{ order: -1 !important; > .titlebar-buttonbox{ @@ -11,7 +12,8 @@ See the above repository for updates as well as full license text. */ } } } -@media not (-moz-bool-pref: "sidebar.verticalTabs"){ +@media not (-moz-bool-pref: "sidebar.verticalTabs"), + not -moz-pref("sidebar.verticalTabs"){ .global-notificationbox, #tab-notification-deck, #TabsToolbar{ @@ -37,6 +39,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"), (-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 4a8a3f0..b92588c 100644 --- a/chrome/toolbars_below_content_v2.css +++ b/chrome/toolbars_below_content_v2.css @@ -71,7 +71,8 @@ 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"){ +@media (-moz-bool-pref: "userchrome.toolbars-below-content.tabs-at-bottom.enabled"), + -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 88b8e7e..c60c968 100644 --- a/chrome/vertical_menubar.css +++ b/chrome/vertical_menubar.css @@ -68,7 +68,8 @@ 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"){ + @media (-moz-bool-pref: "userchrome.vertical-menubar.on-right.enabled"), + -moz-pref("userchrome.vertical-menubar.on-right.enabled"){ :root:not([inDOMFullscreen]) #browser{ margin-inline: 0 var(--uc-vertical-menubar-width); }