From 71fe0e87c7adf662cea0235619daa986c50768b8 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sat, 12 Feb 2022 09:20:20 +0200 Subject: [PATCH] add basic support for -moz-platform media query --- chrome/autohide_toolbox.css | 4 +++- chrome/classic_firefox_menu_button.css | 23 +++++-------------- chrome/combined_tabs_and_main_toolbars.css | 10 +++++--- chrome/fake_statusbar_w_menubar.css | 4 +++- chrome/hide_tabs_toolbar_w_alltabs_button.css | 10 ++++++-- chrome/hide_tabs_with_one_tab.css | 8 +++++-- ...de_tabs_with_one_tab_w_window_controls.css | 8 +++++-- chrome/menubar_in_main_toolbar.css | 8 +++++-- chrome/multi-row_tabs_below_content.css | 8 +++++-- chrome/overlay_menubar.css | 4 +++- chrome/show_navbar_on_focus_only.css | 6 +++-- chrome/show_window_title_in_menubar.css | 4 +++- chrome/tabs_below_content.css | 4 +++- chrome/tabs_on_bottom.css | 8 +++++-- chrome/toolbars_below_content.css | 4 +++- chrome/window_control_placeholder_support.css | 5 +++- 16 files changed, 77 insertions(+), 41 deletions(-) diff --git a/chrome/autohide_toolbox.css b/chrome/autohide_toolbox.css index 63afdda..8171d80 100644 --- a/chrome/autohide_toolbox.css +++ b/chrome/autohide_toolbox.css @@ -18,7 +18,9 @@ See the above repository for updates as well as full license text. */ /* Dummy variable to support versions 94-96, can be removed when 96 lands */ :root{ --lwt-frame: var(--lwt-accent-color) } -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ +@media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ :root[tabsintitlebar][sizemode="maximized"]:not([inDOMFullscreen]) > body > box{ margin-top: 8px !important; } diff --git a/chrome/classic_firefox_menu_button.css b/chrome/classic_firefox_menu_button.css index 9b1b797..58d0893 100644 --- a/chrome/classic_firefox_menu_button.css +++ b/chrome/classic_firefox_menu_button.css @@ -40,21 +40,6 @@ See the above repository for updates as well as full license text. */ margin-inline-end: 4px; } -#PanelUI-button{ - position: fixed; - display: flex; - top: 0; -} - -#toolbar-menubar, -#toolbar-menubar[autohide="true"] + #TabsToolbar{ - padding-left: 94px !important; -} - -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"] #PanelUI-button{ top:7px !important; } -} - /* OPTIONAL - move the menu button to top-left corner of the window. * Don't use this if you also use tabs_on_bottom.css */ @@ -71,7 +56,11 @@ See the above repository for updates as well as full license text. */ padding-left: 94px !important; } -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"] #PanelUI-button{ top:7px !important; } +@media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ + :root[tabsintitlebar][sizemode="maximized"] #PanelUI-button{ + top:7px !important; + } } */ \ No newline at end of file diff --git a/chrome/combined_tabs_and_main_toolbars.css b/chrome/combined_tabs_and_main_toolbars.css index 8ce9574..153b5be 100644 --- a/chrome/combined_tabs_and_main_toolbars.css +++ b/chrome/combined_tabs_and_main_toolbars.css @@ -18,7 +18,7 @@ See the above repository for updates as well as full license text. */ } :root[tabsintitlebar="true"] #nav-bar{ padding-inline: calc(var(--uc-hide-window-control-space,1) * 96px + 20px) 0px !important; } - @media (-moz-os-version: windows-win10){ + @media (-moz-platform: windows-win10),(-moz-os-version: 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{ -moz-box-direction: reverse } @@ -27,8 +27,12 @@ See the above repository for updates as well as full license text. */ #navigator-toolbox{ --tab-min-height: 40px } :root[uidensity="compact"] #navigator-toolbox{ --tab-min-height: 32px } -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"] > body > box{ margin-top: 8px } +@media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ + :root[tabsintitlebar][sizemode="maximized"] > body > box{ + margin-top: 8px; + } } #navigator-toolbox{ diff --git a/chrome/fake_statusbar_w_menubar.css b/chrome/fake_statusbar_w_menubar.css index 42fa757..4a95db2 100644 --- a/chrome/fake_statusbar_w_menubar.css +++ b/chrome/fake_statusbar_w_menubar.css @@ -26,7 +26,9 @@ See the above repository for updates as well as full license text. */ :root{ --lwt-frame: var(--lwt-accent-color) } :root{ --uc-fake-titlebar-padding: 0px } - @media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ + @media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ :root[sizemode="maximized"][tabsintitlebar]{ --uc-fake-titlebar-padding: 8px } } #navigator-toolbox{ diff --git a/chrome/hide_tabs_toolbar_w_alltabs_button.css b/chrome/hide_tabs_toolbar_w_alltabs_button.css index 3dc7a9e..b6cd1d9 100644 --- a/chrome/hide_tabs_toolbar_w_alltabs_button.css +++ b/chrome/hide_tabs_toolbar_w_alltabs_button.css @@ -14,7 +14,13 @@ See the above repository for updates as well as full license text. */ :root{ --uc-titlebar-padding: 0px; --uc-window-control-width: 40px } :root[tabsintitlebar]{ --uc-window-control-width: 160px } :root[inFullscreen]{ --uc-window-control-width: 0px } -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ - :root[sizemode="maximized"][tabsintitlebar]{ --uc-titlebar-padding: 8px } + +@media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ + :root[sizemode="maximized"][tabsintitlebar]{ + --uc-titlebar-padding: 8px; + } } + #titlebar{ -moz-appearance: none !important; margin-top: var(--uc-titlebar-padding) } diff --git a/chrome/hide_tabs_with_one_tab.css b/chrome/hide_tabs_with_one_tab.css index 9c426f9..10c0ba8 100644 --- a/chrome/hide_tabs_with_one_tab.css +++ b/chrome/hide_tabs_with_one_tab.css @@ -48,8 +48,12 @@ See the above repository for updates as well as full license text. */ background-color: transparent !important; } /* Extra top padding in maximized window */ -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"] #navigator-toolbox{ padding-top:7px !important; } +@media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ + :root[tabsintitlebar][sizemode="maximized"] #navigator-toolbox{ + padding-top:7px !important; + } } /* Fix window controls not being clickable */ :root[tabsintitlebar] #toolbar-menubar[autohide="true"][inactive]{ diff --git a/chrome/hide_tabs_with_one_tab_w_window_controls.css b/chrome/hide_tabs_with_one_tab_w_window_controls.css index 104a3c6..0dac8c9 100644 --- a/chrome/hide_tabs_with_one_tab_w_window_controls.css +++ b/chrome/hide_tabs_with_one_tab_w_window_controls.css @@ -55,8 +55,12 @@ Window controls will be all wrong without it background-color: transparent !important; } /* Extra top padding in maximized window */ -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"] #navigator-toolbox{ padding-top:7px !important; } +@media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ + :root[tabsintitlebar][sizemode="maximized"] #navigator-toolbox{ + padding-top:7px !important; + } } /* Window controls in nav-bar */ :root:not([customizing]) #toolbar-menubar[inactive]{ diff --git a/chrome/menubar_in_main_toolbar.css b/chrome/menubar_in_main_toolbar.css index 33103f2..c169d5e 100644 --- a/chrome/menubar_in_main_toolbar.css +++ b/chrome/menubar_in_main_toolbar.css @@ -7,8 +7,12 @@ See the above repository for updates as well as full license text. */ :root[uidensity="compact"] #navigator-toolbox{ --uc-menubar-height: 30px } #titlebar{ -moz-box-direction: reverse; -moz-appearance: none !important; } -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ - :root[sizemode="maximized"][tabsintitlebar] #TabsToolbar{ margin-top: 8px !important; } +@media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ + :root[sizemode="maximized"][tabsintitlebar] #TabsToolbar{ + margin-top: 8px !important; + } } #toolbar-menubar{ margin-bottom: calc(0px - var(--uc-menubar-height)); diff --git a/chrome/multi-row_tabs_below_content.css b/chrome/multi-row_tabs_below_content.css index 129258e..80a98ef 100644 --- a/chrome/multi-row_tabs_below_content.css +++ b/chrome/multi-row_tabs_below_content.css @@ -25,8 +25,12 @@ See the above repository for updates as well as full license text. */ --multirow-tab-min-width: 100px; --multirow-tab-dynamic-width: 1; /* Change to 0 for fixed-width tabs using the above width. */ } - @media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ - :root[tabsintitlebar][sizemode="maximized"]{ --multirow-top-padding: 8px } + @media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ + :root[tabsintitlebar][sizemode="maximized"]{ + --multirow-top-padding: 8px; + } } :root[uidensity="compact"]{--multirow-toolbar-height: 34px} :root{ border-top-width: 0px !important } diff --git a/chrome/overlay_menubar.css b/chrome/overlay_menubar.css index 5d48d02..28c8f16 100644 --- a/chrome/overlay_menubar.css +++ b/chrome/overlay_menubar.css @@ -14,7 +14,9 @@ See the above repository for updates as well as full license text. */ #toolbar-menubar[autohide="true"][inactive="true"]{ height: 0px !important; } -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ +@media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ :root[tabsintitlebar][sizemode="maximized"] #toolbar-menubar{ top: 8px; } } diff --git a/chrome/show_navbar_on_focus_only.css b/chrome/show_navbar_on_focus_only.css index bbf74b8..90f78df 100644 --- a/chrome/show_navbar_on_focus_only.css +++ b/chrome/show_navbar_on_focus_only.css @@ -10,8 +10,10 @@ See the above repository for updates as well as full license text. */ :root:not([customizing]) #titlebar{ -moz-appearance: none !important; } /* -moz-appearance: none on titlebar breaks window margins, so re-adjust that */ -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ - +@media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ + :root[sizemode="maximized"]{ margin-top: 8px !important; } @media screen and (min-resolution: 1.25dppx){ diff --git a/chrome/show_window_title_in_menubar.css b/chrome/show_window_title_in_menubar.css index 58cb94b..a792328 100644 --- a/chrome/show_window_title_in_menubar.css +++ b/chrome/show_window_title_in_menubar.css @@ -21,7 +21,9 @@ See the above repository for updates as well as full license text. */ overflow-x: -moz-hidden-unscrollable; text-overflow: ellipsis; } - @media (-moz-os-version: windows-win7),(-moz-os-version:windows-win10){ + @media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ :root[sizemode="maximized"] > head > title { padding-top: 10px } } } \ No newline at end of file diff --git a/chrome/tabs_below_content.css b/chrome/tabs_below_content.css index afef55b..0b5a5ef 100644 --- a/chrome/tabs_below_content.css +++ b/chrome/tabs_below_content.css @@ -33,7 +33,9 @@ linux_gtk_window_control_patch.css :root[tabsintitlebar="true"]:not([inFullscreen]) #toolbar-menubar[autohide="false"] .titlebar-buttonbox-container{ height: 100%; } :root[tabsintitlebar="true"]:not([inFullscreen]) #toolbar-menubar[autohide="false"] .titlebar-button{ padding: 2px 17px !important; } -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ +@media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ #titlebar{ -moz-appearance: none !important; } /* Counteract -moz-appearance when maximized */ :root[tabsintitlebar][sizemode="maximized"] #navigator-toolbox{ padding-top: 8px !important; } diff --git a/chrome/tabs_on_bottom.css b/chrome/tabs_on_bottom.css index 31abed1..00a8a2c 100644 --- a/chrome/tabs_on_bottom.css +++ b/chrome/tabs_on_bottom.css @@ -16,8 +16,12 @@ linux_gtk_window_control_patch.css */ :root{ --uc-titlebar-padding: 0px; } -@media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ - :root[sizemode="maximized"][tabsintitlebar]{ --uc-titlebar-padding: 8px } +@media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ + :root[sizemode="maximized"][tabsintitlebar]{ + --uc-titlebar-padding: 8px; + } } #toolbar-menubar[autohide="true"] > .titlebar-buttonbox-container, #TabsToolbar > .titlebar-buttonbox-container{ diff --git a/chrome/toolbars_below_content.css b/chrome/toolbars_below_content.css index 321a203..3a903fb 100644 --- a/chrome/toolbars_below_content.css +++ b/chrome/toolbars_below_content.css @@ -12,7 +12,9 @@ See the above repository for updates as well as full license text. */ #titlebar{ -moz-appearance: none !important; } - @media (-moz-os-version: windows-win7),(-moz-os-version: windows-win10){ + @media (-moz-platform: windows), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win10){ /* Next two variables are used by autohide_menubar.css */ #toolbar-menubar{ --uc-menubar-extra-margin: 0px } :root[tabsintitlebar][sizemode="maximized"] #toolbar-menubar{ diff --git a/chrome/window_control_placeholder_support.css b/chrome/window_control_placeholder_support.css index 9c81c35..53d446c 100644 --- a/chrome/window_control_placeholder_support.css +++ b/chrome/window_control_placeholder_support.css @@ -21,7 +21,10 @@ See the above repository for updates as well as full license text. */ --uc-window-drag-space-pre: 0px; /* Remove pre space */ } -@media (-moz-os-version: windows-win7), (-moz-os-version: windows-win8) { +@media (-moz-platform: windows-win7), + (-moz-platform: windows-win8), + (-moz-os-version: windows-win7), + (-moz-os-version: windows-win8){{ :root[tabsintitlebar] { --uc-window-control-width: 105px; }