From a6f9e49d1226d7c1e17e412f38daa18a6bcaa8d0 Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sun, 29 Oct 2023 12:31:59 +0200 Subject: [PATCH] fx 119 workaround: apply --toolbar-bgcolor workaround for a few styles This applies same kind of change to a few styles that was introduced for autohide_bookmarks_toolbar.css in #315 --- chrome/floating_findbar_on_top.css | 13 ++++++++++++- chrome/hide_tabs_with_one_tab.css | 10 ++++++++++ chrome/multi-row_tabs_below_content.css | 10 ++++++++++ chrome/status_inside_urlbar.css | 11 ++++++++++- chrome/status_inside_urlbar_v2.css | 11 ++++++++++- 5 files changed, 52 insertions(+), 3 deletions(-) diff --git a/chrome/floating_findbar_on_top.css b/chrome/floating_findbar_on_top.css index fb97ee2..b87e0bc 100644 --- a/chrome/floating_findbar_on_top.css +++ b/chrome/floating_findbar_on_top.css @@ -36,7 +36,18 @@ findbar > .close-icon{ background-image: linear-gradient(var(--toolbar-bgcolor),var(--toolbar-bgcolor)),var(--lwt-header-image,none); pointer-events: auto; } - +/* This is a workaround for fx 119 specifically for users that use default theme, should remove when 120 is released. See bug 1853524 */ +findbar:not(:-moz-lwtheme){ + --toolbar-bgcolor: #f9f9fb; + --chrome-content-separator-color: rgb(204, 204, 204); +} +/* ...and for dark variant */ +@media (prefers-color-scheme: dark){ + findbar:not(:-moz-lwtheme){ + --toolbar-bgcolor: rgb(43, 42, 51); + --chrome-content-separator-color: hsl(240, 5%, 5%); + } +} findbar > .findbar-container{ border-bottom-right-radius: 4px; border-right-width: 1px; diff --git a/chrome/hide_tabs_with_one_tab.css b/chrome/hide_tabs_with_one_tab.css index fb811ef..d4b566b 100644 --- a/chrome/hide_tabs_with_one_tab.css +++ b/chrome/hide_tabs_with_one_tab.css @@ -40,6 +40,16 @@ This will NOT work correctly if you have hidden tabs such as with tab groups ext :where(#nav-bar){ border-inline: var(--uc-window-drag-space-width,0) solid var(--toolbar-bgcolor); } +/* This is a workaround for fx 119 specifically for users that use default theme, should remove when 120 is released. See bug 1853524 */ +:root:not(:-moz-lwtheme){ + --toolbar-bgcolor: #f9f9fb; +} +/* ...and for dark variant */ +@media (prefers-color-scheme: dark){ + :root:not(:-moz-lwtheme){ + --toolbar-bgcolor: rgb(43, 42, 51); + } +} @media (-moz-platform: linux){ #TabsToolbar .titlebar-buttonbox{ align-items: stretch !important; diff --git a/chrome/multi-row_tabs_below_content.css b/chrome/multi-row_tabs_below_content.css index e360d17..fecf96e 100644 --- a/chrome/multi-row_tabs_below_content.css +++ b/chrome/multi-row_tabs_below_content.css @@ -38,6 +38,16 @@ See the above repository for updates as well as full license text. */ #main-window[tabsintitlebar]{ background-color: var(--toolbar-bgcolor,accentcolor) !important;; } + /* This is a workaround for fx 119 specifically for users that use default theme, should remove when 120 is released. See bug 1853524 */ + #main-window[tabsintitlebar]:not(:-moz-lwtheme){ + --toolbar-bgcolor: #f9f9fb; + } + /* ...and for dark variant */ + @media (prefers-color-scheme: dark){ + #main-window[tabsintitlebar]:not(:-moz-lwtheme){ + --toolbar-bgcolor: rgb(43, 42, 51); + } + } :root[uidensity="compact"]{ --multirow-toolbar-height: 34px } :root{ border-top-width: 0px !important } diff --git a/chrome/status_inside_urlbar.css b/chrome/status_inside_urlbar.css index 82d921c..21f89b0 100644 --- a/chrome/status_inside_urlbar.css +++ b/chrome/status_inside_urlbar.css @@ -60,7 +60,16 @@ As a workaround, the -moz-element background image is removed somewhat often whi } /* If you use a theme where urlbar is partially transparent you should edit this color to something that closely matches the perceived color of urlbar. Or perhaps use background-image - linear-gradient() can work well here. But keep the color or image opaque or otherwise you'll face an issue where urlbar text bleeds through */ #statuspanel{ background-color: var(--toolbar-bgcolor) } - +/* This is a workaround for fx 119 specifically for users that use default theme, should remove when 120 is released. See bug 1853524 */ +#statuspanel:not(:-moz-lwtheme){ + background-color: #f9f9fb; +} +/* ...and for dark variant */ +@media (prefers-color-scheme: dark){ + #statuspanel:not(:-moz-lwtheme){ + background-color: rgb(43, 42, 51); + } +} #statuspanel{ color: var(--toolbar-field-color, black); z-index: -1; diff --git a/chrome/status_inside_urlbar_v2.css b/chrome/status_inside_urlbar_v2.css index c46d150..e81a07b 100644 --- a/chrome/status_inside_urlbar_v2.css +++ b/chrome/status_inside_urlbar_v2.css @@ -51,7 +51,16 @@ As a workaround, the -moz-element background image is removed somewhat often whi /* If you use a theme where urlbar is partially transparent you should edit this color to something that closely matches the perceived color of urlbar. Or perhaps use background-image - linear-gradient() can work well here. But keep the color or image opaque or otherwise you'll face an issue where urlbar text bleeds through */ #statuspanel{ background-color: var(--toolbar-bgcolor) } - +/* This is a workaround for fx 119 specifically for users that use default theme, should remove when 120 is released. See bug 1853524 */ +#statuspanel:not(:-moz-lwtheme){ + background-color: #f9f9fb; +} +/* ...and for dark variant */ +@media (prefers-color-scheme: dark){ + #statuspanel:not(:-moz-lwtheme){ + background-color: rgb(43, 42, 51); + } +} #statuspanel{ color: var(--toolbar-field-color, black); z-index: -1;