From b8c7b03f21c26751832963a3a0be585e76c98bf3 Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:15:38 +0800 Subject: [PATCH 01/10] fix theme issues in ff 119+ (VIEW README) --- README.md | 17 +-- chrome/content/newtab.css | 6 +- chrome/global/colors.css | 246 +++++++++++--------------------------- chrome/toolbar/tabbar.css | 38 +++--- chrome/toolbar/urlbar.css | 3 +- 5 files changed, 99 insertions(+), 211 deletions(-) diff --git a/README.md b/README.md index 24bbb4c..48500de 100644 --- a/README.md +++ b/README.md @@ -10,19 +10,22 @@ A Firefox userChrome.css theme that aims to recreate the look and feel of the Ch 3. Go to about:config and change these preferences: ### For all operating systems: - 1. `toolkit.legacyUserProfileCustomizations.stylesheets` = `true` - 2. `svg.context-properties.content.enabled` = `true` - 3. `layout.css.color-mix.enabled` = `true` + * `toolkit.legacyUserProfileCustomizations.stylesheets` = `true` + * `svg.context-properties.content.enabled` = `true` + * `layout.css.color-mix.enabled` = `true` + + ### Firefox 119.0 and above: + * `layout.css.light-dark.enabled` = `true` ### On macOS: - 1. To use the Edge style context menu on macOS then set `widget.macos.native-context-menus` = `false` + * To use the Edge style context menu on macOS then set `widget.macos.native-context-menus` = `false` ### Recommended: - 1. `browser.tabs.tabMinWidth` = `66` - 2. `browser.tabs.tabClipWidth` = `86` + * `browser.tabs.tabMinWidth` = `66` + * `browser.tabs.tabClipWidth` = `86` ### Optional: - 1. To use the light theme in private browsing mode set `browser.theme.dark-private-windows` = `false` + * To use the light theme in private browsing mode set `browser.theme.dark-private-windows` = `false` Additional tweaks can also be applied to the theme, such as Mica (Windows 11 Only), Floating Tabs and more. See [Tweaks](#tweaks). diff --git a/chrome/content/newtab.css b/chrome/content/newtab.css index bddfe20..bec377d 100644 --- a/chrome/content/newtab.css +++ b/chrome/content/newtab.css @@ -4,8 +4,7 @@ @-moz-document url-prefix("about:newtab"), url-prefix("about:home"), url-prefix("about:firefoxview") { - :root:not([lwt-newtab]) > body:not([lwt-newtab]), - :is(:root, body)[style*="--newtab-background-color: rgb(249, 249, 251)"] { + :root:not([lwt-newtab], [lwt-newtab-brighttext]) { --newtab-background-color: #F7F7F7 !important; --newtab-background-color-secondary: #fff !important; --newtab-text-primary-color: #252525 !important; @@ -33,8 +32,7 @@ url-prefix("about:firefoxview") { --newtab-button-secondary-color: inherit !important; } - :is(:root, body)[style*="--newtab-background-color: rgb(43, 42, 51)"][lwt-newtab-brighttext], - :is(:root, body):not([style*="color"])[lwt-newtab-brighttext] { + :root:not([style*="color"])[lwt-newtab-brighttext] { --newtab-background-color: #252525 !important; --newtab-background-color-secondary: #4A4A4A !important; --newtab-text-primary-color: #fff !important; diff --git a/chrome/global/colors.css b/chrome/global/colors.css index 2be755b..58b142b 100644 --- a/chrome/global/colors.css +++ b/chrome/global/colors.css @@ -1,138 +1,70 @@ /* EdgeFr-Fox by bmFtZQ - colors.css */ -/* light */ -:root:not(:-moz-lwtheme), -:root[style*="--lwt-accent-color: rgb(240, 240, 244)"] { - --lwt-accent-color: #cecece !important; - --lwt-accent-color-inactive: #e8e8e8 !important; - --lwt-text-color: #000 !important; - --toolbar-bgcolor: #f7f7f7 !important; - --toolbar-color: #000 !important; - --toolbarbutton-icon-fill: #000 !important; - --chrome-content-separator-color: #bfbfbf !important; - --lwt-toolbarbutton-icon-fill-attention: #0078D4 !important; - --toolbarbutton-icon-fill-attention: #0078D4 !important; +/* default colours (light & dark) */ +:root:not(:-moz-lwtheme) { + --lwt-accent-color: light-dark(#cecece, #1C1C1C) !important; + --lwt-accent-color-inactive: light-dark(#e8e8e8, #2e2e2e) !important; + --lwt-text-color: light-dark(#000, #E5E5E5) !important; + --toolbar-bgcolor: light-dark(#f7f7f7, #3B3B3B) !important; + --toolbar-color: light-dark(#000, #fff) !important; + --toolbarbutton-icon-fill: light-dark(#000, #fff) !important; + --chrome-content-separator-color: light-dark(#bfbfbf, #686868) !important; + --lwt-toolbarbutton-icon-fill-attention: light-dark(#0078D4, #4C98D1) !important; + --toolbarbutton-icon-fill-attention: light-dark(#0078D4, #4C98D1) !important; --lwt-tab-text: var(--toolbar-color) !important; - --lwt-selected-tab-background-color: var(--toolbar-bgcolor) !important; - --tab-selected-bgcolor: var(--toolbar-bgcolor) !important; - --toolbar-field-background-color: #fff !important; - --toolbar-field-color: #000 !important; - --toolbar-field-border-color: #0000 !important; + --lwt-selected-tab-background-color: unset !important; + --tab-selected-bgcolor: unset !important; + --toolbar-field-background-color: light-dark(#fff, #2B2B2B) !important; + --toolbar-field-color: light-dark(#000, #fff) !important; + --toolbar-field-border-color: light-dark(#0000, #0000) !important; --toolbar-field-focus-background-color: var(--toolbar-field-background-color) !important; --toolbar-field-focus-color: var(--toolbar-field-color) !important; - --toolbar-field-focus-border-color: #0055D7 !important; - --urlbar-hover-highlight-color: rgba(192, 192, 192, 0.5) !important; - --urlbar-box-bgcolor: rgba(0, 0, 0, 0.09) !important; - --urlbar-box-hover-bgcolor: rgba(0, 0, 0, 0.09) !important; - --urlbar-box-focus-bgcolor: rgba(0, 0, 0, 0.22) !important; - --urlbar-icon-fill-opacity: 0.6 !important; - --urlbar-popup-url-color: #0072C9 !important; + --toolbar-field-focus-border-color: light-dark(#0055D7, #63ADE5) !important; + --urlbar-hover-highlight-color: light-dark(rgba(192, 192, 192, 0.5), rgba(128, 128, 128, 0.5)) !important; + --urlbar-box-bgcolor: light-dark(rgba(0, 0, 0, 0.09), rgba(255, 255, 255, 0.11)) !important; + --urlbar-box-hover-bgcolor: light-dark(rgba(0, 0, 0, 0.09), rgba(255, 255, 255, 0.11)) !important; + --urlbar-box-focus-bgcolor: light-dark(rgba(0, 0, 0, 0.22), rgba(255, 255, 255, 0.28)) !important; + --urlbar-icon-fill-opacity: 1 !important; + --urlbar-popup-url-color: light-dark(#0072C9, #75B6E8) !important; --lwt-brighttext-url-color: var(--urlbar-popup-url-color) !important; - --autocomplete-popup-background: #fff !important; - --autocomplete-popup-color: #fff !important; - --autocomplete-popup-highlight-background: #f2f2f2 !important; - --autocomplete-popup-hover-background: #e5e5e5 !important; - --autocomplete-popup-separator-color: #dadada00 !important; - --button-bgcolor: #EDEDED !important; - --button-hover-bgcolor: #e5e5e5 !important; - --button-active-bgcolor: #d5d5d5 !important; - --button-primary-bgcolor: #0078D4 !important; - --button-primary-hover-bgcolor: #006CBE !important; - --button-primary-active-bgcolor: #1683D8 !important; - --button-primary-color: #fff !important; - --error-text-color: #FF9AA2 !important; - --input-bgcolor: #fff !important; - --input-color: #2b2b2b !important; - --input-border-color: #bebebe !important; - --input-error-border-color: #FF848A !important; - --zoom-controls-bgcolor: #4A4A4A !important; - --arrowpanel-background: #fff !important; - --arrowpanel-color: #1c1c1c !important; - --panel-description-color: #000a !important; - --panel-disabled-color: #9E9E9E !important; - --arrowpanel-dimmed: #565656 !important; - --arrowpanel-dimmed-further: #707070 !important; - --panel-item-hover-bgcolor: #eee !important; - --panel-item-active-bgcolor: #ddd !important; - --arrowpanel-border-color: #dadada !important; - --panel-separator-color: #dadada !important; - --panel-banner-item-update-supported-bgcolor: #188038 !important; - --focus-outline-color: #0055D7 !important; + --autocomplete-popup-background: light-dark(#fff, #4A4A4A) !important; + --autocomplete-popup-color: light-dark(#fff, #fff) !important; + --autocomplete-popup-highlight-background: light-dark(#f2f2f2, #383838) !important; + --autocomplete-popup-hover-background: light-dark(#e5e5e5, #444444) !important; + --autocomplete-popup-separator-color: light-dark(#dadada00, #63636300) !important; + --button-bgcolor: light-dark(#EDEDED, #5C5C5C) !important; + --button-hover-bgcolor: light-dark(#e5e5e5, #646464) !important; + --button-active-bgcolor: light-dark(#d5d5d5, #575757) !important; + --button-primary-bgcolor: light-dark(#0078D4, #006CBE) !important; + --button-primary-hover-bgcolor: light-dark(#006CBE, #0078D4) !important; + --button-primary-active-bgcolor: light-dark(#1683D8, #005CA3) !important; + --button-primary-color: light-dark(#fff, #fff) !important; + --error-text-color: light-dark(#FF9AA2, #FF9AA2) !important; + --input-bgcolor: light-dark(#fff, #4A4A4A) !important; + --input-color: light-dark(#2b2b2b, #fff) !important; + --input-border-color: light-dark(#bebebe, #8A8A8A) !important; + --input-error-border-color: light-dark(#FF848A, #FF848A) !important; + --zoom-controls-bgcolor: light-dark(#4A4A4A, #4A4A4A) !important; + --arrowpanel-background: light-dark(#fff, #4A4A4A) !important; + --arrowpanel-color: light-dark(#1c1c1c, #fff) !important; + --panel-description-color: light-dark(#000a, #fffb) !important; + --panel-disabled-color: light-dark(#9E9E9E, #ABABAA) !important; + --arrowpanel-dimmed: light-dark(#565656, #565656) !important; + --arrowpanel-dimmed-further: light-dark(#707070, #707070) !important; + --panel-item-hover-bgcolor: light-dark(#eee, #646464) !important; + --panel-item-active-bgcolor: light-dark(#ddd, #747474) !important; + --arrowpanel-border-color: light-dark(#dadada, #636363) !important; + --panel-separator-color: light-dark(#dadada, #636363) !important; + --panel-banner-item-update-supported-bgcolor: light-dark(#188038, #81C995) !important; + --focus-outline-color: light-dark(#0055D7, #63ADE5) !important; --panel-shortcut-color: inherit !important; --uc-urlbar-shadow: 0 0 4px rgba(0, 0, 0, 0.1); - --toolbarbutton-hover-background: rgba(0, 0, 0, 0.08) !important; - --toolbarbutton-active-background: rgba(0, 0, 0, 0.12) !important; + --toolbarbutton-hover-background: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.1)) !important; + --toolbarbutton-active-background: light-dark(rgba(0, 0, 0, 0.12), rgba(255, 255, 255, 0.16)) !important; --uc-private-browsing-indicator: var(--button-primary-bgcolor); --uc-private-browsing-indicator-text: var(--button-primary-color); - --tab-icon-overlay-stroke: #fff !important; - --tab-icon-overlay-fill: #252525 !important; -} - -/* dark */ -:root[lwt-default-theme-in-dark-mode="true"], -:root[style*="--lwt-accent-color: rgb(28, 27, 34)"] { - --lwt-accent-color: #1C1C1C !important; - --lwt-accent-color-inactive: #2e2e2e !important; - --lwt-text-color: #E5E5E5 !important; - --toolbar-bgcolor: #3B3B3B !important; - --toolbar-color: #fff !important; - --toolbarbutton-icon-fill: #fff !important; - --chrome-content-separator-color: #686868 !important; - --lwt-toolbarbutton-icon-fill-attention: #4C98D1 !important; - --toolbarbutton-icon-fill-attention: #4C98D1 !important; - --lwt-tab-text: var(--toolbar-color) !important; - --lwt-selected-tab-background-color: var(--toolbar-bgcolor) !important; - --tab-selected-bgcolor: var(--toolbar-bgcolor) !important; - --toolbar-field-background-color: #2B2B2B !important; - --toolbar-field-color: #fff !important; - --toolbar-field-border-color: #0000 !important; - --toolbar-field-focus-background-color: var(--toolbar-field-background-color) !important; - --toolbar-field-focus-color: var(--toolbar-field-color) !important; - --toolbar-field-focus-border-color: #63ADE5 !important; - --urlbar-hover-highlight-color: rgba(128, 128, 128, 0.5) !important; - --urlbar-box-bgcolor: rgba(255, 255, 255, 0.11) !important; - --urlbar-box-hover-bgcolor: rgba(255, 255, 255, 0.11) !important; - --urlbar-box-focus-bgcolor: rgba(255, 255, 255, 0.28) !important; - --urlbar-icon-fill-opacity: 1 !important; - --urlbar-popup-url-color: #75B6E8 !important; - --lwt-brighttext-url-color: var(--urlbar-popup-url-color) !important; - --autocomplete-popup-background: #4A4A4A !important; - --autocomplete-popup-color: #fff !important; - --autocomplete-popup-highlight-background: #383838 !important; - --autocomplete-popup-hover-background: #444444 !important; - --autocomplete-popup-separator-color: #63636300 !important; - --button-bgcolor: #5C5C5C !important; - --button-hover-bgcolor: #646464 !important; - --button-active-bgcolor: #575757 !important; - --button-primary-bgcolor: #006CBE !important; - --button-primary-hover-bgcolor: #0078D4 !important; - --button-primary-active-bgcolor: #005CA3 !important; - --button-primary-color: #fff !important; - --error-text-color: #FF9AA2 !important; - --input-bgcolor: #4A4A4A !important; - --input-color: #fff !important; - --input-border-color: #8A8A8A !important; - --input-error-border-color: #FF848A !important; - --zoom-controls-bgcolor: #4A4A4A !important; - --arrowpanel-background: #4A4A4A !important; - --arrowpanel-color: #fff !important; - --panel-description-color: #fffb !important; - --panel-disabled-color: #ABABAA !important; - --arrowpanel-dimmed: #565656 !important; - --arrowpanel-dimmed-further: #707070 !important; - --panel-item-hover-bgcolor: #646464 !important; - --panel-item-active-bgcolor: #747474 !important; - --arrowpanel-border-color: #636363 !important; - --panel-separator-color: #636363 !important; - --panel-banner-item-update-supported-bgcolor: #81C995 !important; - --focus-outline-color: #63ADE5 !important; - --panel-shortcut-color: inherit !important; - --toolbarbutton-hover-background: rgba(255, 255, 255, 0.1) !important; - --toolbarbutton-active-background: rgba(255, 255, 255, 0.16) !important; - --uc-private-browsing-indicator: var(--button-primary-bgcolor); - --uc-private-browsing-indicator-text: var(--button-primary-color); - --tab-icon-overlay-stroke: #4b4b4b !important; - --tab-icon-overlay-fill: #fff !important; + --tab-icon-overlay-stroke: light-dark(#fff, #4b4b4b) !important; + --tab-icon-overlay-fill: light-dark(#252525, #fff) !important; } #urlbar { @@ -142,25 +74,13 @@ } /* Change Colour of page when loading */ -:root:not(:-moz-lwtheme) #tabbrowser-tabpanels, -:root[style*="--lwt-accent-color: rgb(240, 240, 244)"] #tabbrowser-tabpanels { - background-color: #f7f7f7 !important; -} - -:root[lwt-default-theme-in-dark-mode="true"] #tabbrowser-tabpanels, -:root[style*="--lwt-accent-color: rgb(28, 27, 34)"] #tabbrowser-tabpanels { - background-color: #252525 !important; +:root:not(:-moz-lwtheme) #tabbrowser-tabpanels { + background-color: light-dark(#f7f7f7, #252525) !important; } /* make the titlebar buttons black/white on default themes */ -:root:not(:-moz-lwtheme)[tabsintitlebar] .titlebar-buttonbox, -:root[style*="--lwt-accent-color: rgb(240, 240, 244)"][tabsintitlebar] .titlebar-buttonbox { - color: #000 !important; -} - -:root[lwt-default-theme-in-dark-mode="true"][tabsintitlebar] .titlebar-buttonbox, -:root[style*="--lwt-accent-color: rgb(28, 27, 34)"][tabsintitlebar] .titlebar-buttonbox { - color: #fff !important; +:root:not(:-moz-lwtheme)[tabsintitlebar] .titlebar-buttonbox { + color: light-dark(#000, #fff) !important; } #statuspanel-label { @@ -275,57 +195,33 @@ /* side bar theme */ #sidebar-box:not([lwt-sidebar]) { - --sidebar-background-color: #f7f7f7 !important; - --sidebar-text-color: #000 !important; + --sidebar-background-color: light-dark(#f7f7f7, #3b3b3b) !important; + --sidebar-text-color: light-dark(#000, #fff) !important; appearance: none !important; } -#sidebar-box[style*="--sidebar-background-color: rgb(56, 56, 61"] { - --sidebar-background-color: #3B3B3B !important; - --sidebar-text-color: #fff !important; -} - #browser:not([style*="--sidebar-border-color"]) { - --sidebar-border-color: #bfbfbf !important; -} - -#browser[style*="--sidebar-border-color: rgba(255, 255, 255"] { - --sidebar-border-color: #686868 !important; + --sidebar-border-color: light-dark(#bfbfbf, #686868) !important; } .sidebar-panel:not([lwt-sidebar]) { - color: #000 !important; + color: light-dark(#000, #fff) !important; + scrollbar-color: light-dark(#0006, #fff6) light-dark(#f7f7f740, #3b3b3b40) !important; } @-moz-document url(chrome://browser/content/syncedtabs/sidebar.xhtml){ -body { - background: transparent !important; -} -} - -.sidebar-panel[lwt-sidebar-brighttext][style*="--lwt-sidebar-background-color: rgb(56, 56, 61)"], -body[lwt-sidebar-brighttext][style*="--lwt-sidebar-background-color: rgb(56, 56, 61)"] { - --lwt-sidebar-background-color: #3B3B3B !important; - --lwt-sidebar-text-color: #fff !important; - scrollbar-color: #fff6 #3B3B3B40 !important; + body { + background: transparent !important; + } } @media(-moz-platform: windows) { .sidebar-panel:not([lwt-sidebar]) #sidebar-search-container>#search-box, .sidebar-panel:not([lwt-sidebar]) #viewButton { appearance: none !important; - background-color: #fff !important; + background-color: light-dark(#fff, #2b2b2b) !important; color: inherit !important; - border: 1px solid #bfbfbf !important; - border-radius: 2px !important; - } - - .sidebar-panel[lwt-sidebar-brighttext][style*="--lwt-sidebar-background-color: rgb(56, 56, 61)"] #sidebar-search-container>#search-box, - .sidebar-panel[lwt-sidebar-brighttext][style*="--lwt-sidebar-background-color: rgb(56, 56, 61)"] #viewButton { - appearance: none !important; - background-color: #2B2B2B !important; - color: inherit !important; - border: 1px solid #686868 !important; + border: 1px solid light-dark(#bfbfbf, #686868) !important; border-radius: 2px !important; } } diff --git a/chrome/toolbar/tabbar.css b/chrome/toolbar/tabbar.css index 6397907..25ffed8 100644 --- a/chrome/toolbar/tabbar.css +++ b/chrome/toolbar/tabbar.css @@ -86,31 +86,26 @@ box-shadow: -4px 4px 0 4px var(--uc-tab-corner-bg) !important; } -.tabbrowser-tab[selected="true"] .tab-background { - --uc-tab-corner-bg: var(--lwt-selected-tab-background-color, var(--toolbar-bgcolor)); +#tabbrowser-tabs:not([movingtab]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab > .tab-stack > .tab-background:is([selected], [multiselected]):-moz-lwtheme { + background-attachment: scroll, scroll, fixed; + background-color: transparent; + background-image: linear-gradient(var(--lwt-selected-tab-background-color, transparent), var(--lwt-selected-tab-background-color, transparent)), linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-header-image, none); + background-position: 0 0, 0 0, right top; + background-repeat: repeat-x, repeat-x, no-repeat; + background-size: auto 100%, auto 100%, auto auto; } .tab-background:is([selected], [multiselected]) { - --uc-tab-corner-bg: var(--tab-selected-bgcolor, var(--toolbar-bgcolor)); + --uc-tab-corner-bg: var(--tab-selected-bgcolor, var(--lwt-selected-tab-background-color, var(--toolbar-bgcolor))); } -#tabbrowser-tabs:not([movingtab])>#tabbrowser-arrowscrollbox>.tabbrowser-tab>.tab-stack>.tab-background[multiselected="true"]:-moz-lwtheme, -#tabbrowser-tabs:not([movingtab])>#tabbrowser-arrowscrollbox>.tabbrowser-tab>.tab-stack>.tab-background[selected="true"]:-moz-lwtheme { - background-image: linear-gradient(var(--lwt-selected-tab-background-color, transparent), var(--lwt-selected-tab-background-color, transparent)), linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-header-image, none); - --uc-tab-corner-bg: var(--lwt-selected-tab-background-color, var(--toolbar-bgcolor)); -} - -.tabbrowser-tab .tab-background:is([selected], [multiselected]) { - --uc-tab-corner-bg: var(--tab-selected-bgcolor, var(--toolbar-bgcolor)); -} - -.tabbrowser-tab:hover>.tab-stack>.tab-background:not([selected="true"], [multiselected]) { +.tabbrowser-tab:hover .tab-background:not([selected], [multiselected]) { background-color: color-mix(in srgb, currentColor 8%, transparent) !important; --uc-tab-corner-bg: color-mix(in srgb, currentColor 8%, transparent) !important; } @supports not -moz-bool-pref("uc.tweak.floating-tabs") { - :root:not([lwtheme-brighttext="true"]) .tabbrowser-tab:hover>.tab-stack>.tab-background:not([selected="true"], [multiselected]) { + #Tabstoolbar:not([brighttext]) .tabbrowser-tab:hover .tab-background:not([selected], [multiselected]) { background-color: color-mix(in srgb, white 30%, transparent) !important; --uc-tab-corner-bg: color-mix(in srgb, white 30%, transparent) !important; } @@ -134,20 +129,15 @@ margin: 0 !important; } -/* fix colours */ +/* fix window background colours */ @media not (-moz-gtk-csd-available) { - #navigator-toolbox:not(:-moz-lwtheme) { + :root:not(:-moz-lwtheme) #navigator-toolbox { background-color: var(--lwt-accent-color) !important; color: var(--lwt-text-color) !important; } - /* force inactive window on default theme */ - @media not (-moz-platform: windows-win7) { - @media not (-moz-platform: windows-win8) { - #navigator-toolbox:-moz-window-inactive:not(:-moz-lwtheme) { - background-color: var(--lwt-accent-color-inactive, var(--lwt-accent-color)) !important; - } - } + :root:not(:-moz-lwtheme) #navigator-toolbox:-moz-window-inactive { + background-color: var(--lwt-accent-color-inactive, var(--lwt-accent-color)) !important; } } diff --git a/chrome/toolbar/urlbar.css b/chrome/toolbar/urlbar.css index 656dc15..45552b7 100644 --- a/chrome/toolbar/urlbar.css +++ b/chrome/toolbar/urlbar.css @@ -17,7 +17,8 @@ @media not (-moz-gtk-csd-available) { #urlbar[focused="true"]:not([suppress-focus-border])>#urlbar-background:not(:-moz-lwtheme), #searchbar:not(:-moz-lwtheme):focus-within { - outline-color: color-mix(in srgb, var(--toolbar-field-focus-border-color) 50%, transparent) !important; + --uc-outline-dimmed: color-mix(in srgb, var(--toolbar-field-focus-border-color) 50%, transparent); + outline-color: light-dark(var(--uc-outline-dimmed), var(--toolbar-field-focus-border-color)) !important; } } From 71a4bbd932573a19174895ab82bd4dacd797fe5a Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:21:34 +0800 Subject: [PATCH 02/10] update tabbar.css --- chrome/toolbar/tabbar.css | 9 --------- 1 file changed, 9 deletions(-) diff --git a/chrome/toolbar/tabbar.css b/chrome/toolbar/tabbar.css index 25ffed8..f65ffbd 100644 --- a/chrome/toolbar/tabbar.css +++ b/chrome/toolbar/tabbar.css @@ -86,15 +86,6 @@ box-shadow: -4px 4px 0 4px var(--uc-tab-corner-bg) !important; } -#tabbrowser-tabs:not([movingtab]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab > .tab-stack > .tab-background:is([selected], [multiselected]):-moz-lwtheme { - background-attachment: scroll, scroll, fixed; - background-color: transparent; - background-image: linear-gradient(var(--lwt-selected-tab-background-color, transparent), var(--lwt-selected-tab-background-color, transparent)), linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-header-image, none); - background-position: 0 0, 0 0, right top; - background-repeat: repeat-x, repeat-x, no-repeat; - background-size: auto 100%, auto 100%, auto auto; -} - .tab-background:is([selected], [multiselected]) { --uc-tab-corner-bg: var(--tab-selected-bgcolor, var(--lwt-selected-tab-background-color, var(--toolbar-bgcolor))); } From 879abab4446e12463ba68ac43c4c30a5406e2499 Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:35:15 +0800 Subject: [PATCH 03/10] Fix window buttons not working #101 --- README.md | 2 ++ chrome/global/tweaks.css | 1 + chrome/icons/icons.css | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 48500de..c8eefad 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ To disable a tweak, set the key to `false` or delete it, then restart the browse | enable Mica toolbar background *(Windows 11 only)* | | ------------------------------------------------------------------- | +| **BROKEN ON NEWER VERSIONS OF FIREFOX** | | **See [Mica Tweak Instructions][3] for installation instructions.** | | **NOTE: Only works on default theme: 'System theme - auto'** | | `uc.tweak.win11-mica` | @@ -105,6 +106,7 @@ To disable a tweak, set the key to `false` or delete it, then restart the browse | `uc.tweak.show-tab-close-button-on-hover` | ## Mica Tweak Instructions (Windows 11 Only) +NOTE: Broken on newer versions of Firefox. 1. Download and install [Mica For Everyone][2]. 2. Create a custom process rule with the following: 1. Name: `firefox` diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css index e9550f1..8fe2624 100644 --- a/chrome/global/tweaks.css +++ b/chrome/global/tweaks.css @@ -142,6 +142,7 @@ bugs with certain themes eg. dark text on dark background.) */ } } +/* Mica broken on newer versions of Firefox */ @media (-moz-windows-compositor) { @supports -moz-bool-pref("uc.tweak.win11-mica") { /* enable mica appearance */ diff --git a/chrome/icons/icons.css b/chrome/icons/icons.css index 2868cb1..42bda9f 100644 --- a/chrome/icons/icons.css +++ b/chrome/icons/icons.css @@ -2,7 +2,7 @@ /* windows 11 style window controls (no known way to detect between windows 10 and 11 so applied to both) */ -@media (-moz-windows-compositor), +@media (-moz-platform: windows), (-moz-gtk-csd-available) { .titlebar-min { list-style-image: url("win11-minimize.svg") !important; @@ -23,7 +23,7 @@ and 11 so applied to both) */ /* darkmode icon that uses thicker strokes and is easier to see (only needed at 1x scale) */ @media (max-resolution: 1dppx) { - :root[lwtheme-brighttext="true"] .titlebar-close, + toolbar[brighttext] .titlebar-close, .titlebar-close:hover { list-style-image: url("win11-close-dark.svg") !important; } From b187d8f05ca2e3c8e7b6338e36db6142ab0a9d9a Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:38:14 +0800 Subject: [PATCH 04/10] Disable mica appearance by default --- chrome/global/tweaks.css | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css index 8fe2624..bda23a4 100644 --- a/chrome/global/tweaks.css +++ b/chrome/global/tweaks.css @@ -143,9 +143,9 @@ bugs with certain themes eg. dark text on dark background.) */ } /* Mica broken on newer versions of Firefox */ -@media (-moz-windows-compositor) { +/* Uncomment to enable, only works for Firefox versions lower than 115 */ +/* @media (-moz-platform: windows) { @supports -moz-bool-pref("uc.tweak.win11-mica") { - /* enable mica appearance */ #main-window:not([inFullscreen]):not(:-moz-lwtheme), #main-window:not([inFullscreen])[lwt-default-theme-in-dark-mode="true"] { appearance: -moz-win-borderless-glass !important; @@ -156,12 +156,9 @@ bugs with certain themes eg. dark text on dark background.) */ background: transparent !important; } - /* force tab color (for the tab transparency) */ .tab-background:is([selected], [multiselected]) { background: var(--toolbar-bgcolor) !important; } - - /* color adjustments */ :root:not([inFullscreen]):not(:-moz-lwtheme):not(:-moz-window-inactive) { --lwt-accent-color: #00000020 !important; } @@ -197,7 +194,7 @@ bugs with certain themes eg. dark text on dark background.) */ padding-right: 19px !important; } } -} +} */ @media not (-moz-platform: macos) { @supports not -moz-bool-pref("uc.tweak.revert-context-menu") { From 21fb6e55f9ce559cec9027c7d27c1d0583587bf8 Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:39:40 +0800 Subject: [PATCH 05/10] fix a typo in tweaks.css --- chrome/global/tweaks.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css index bda23a4..936704e 100644 --- a/chrome/global/tweaks.css +++ b/chrome/global/tweaks.css @@ -143,7 +143,7 @@ bugs with certain themes eg. dark text on dark background.) */ } /* Mica broken on newer versions of Firefox */ -/* Uncomment to enable, only works for Firefox versions lower than 115 */ +/* Uncomment to enable, only works for Firefox versions lower than 117 */ /* @media (-moz-platform: windows) { @supports -moz-bool-pref("uc.tweak.win11-mica") { #main-window:not([inFullscreen]):not(:-moz-lwtheme), @@ -175,7 +175,6 @@ bugs with certain themes eg. dark text on dark background.) */ } } - /* line up buttons with duplicate icons from -moz-win-glass */ :root:is(:not(:-moz-lwtheme), [lwt-default-theme-in-dark-mode="true"]) .titlebar-buttonbox-container { --uc-titlebar-button-size: 30px; --uc-titlebar-size: calc(var(--tab-min-height) + var(--tab-block-margin)); From f6368602c4eef76d2a0d4cf5718e5c23802857c0 Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Wed, 25 Oct 2023 23:36:38 +0800 Subject: [PATCH 06/10] Fix private browsing colours in FF119(VIEW README) --- chrome/global/colors.css | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/chrome/global/colors.css b/chrome/global/colors.css index 58b142b..a9631c1 100644 --- a/chrome/global/colors.css +++ b/chrome/global/colors.css @@ -1,7 +1,8 @@ /* EdgeFr-Fox by bmFtZQ - colors.css */ /* default colours (light & dark) */ -:root:not(:-moz-lwtheme) { +:root:not(:-moz-lwtheme), +:root[privatebrowsingmode="temporary"][style*="--lwt-accent-color: rgb(28, 27, 34)"] { --lwt-accent-color: light-dark(#cecece, #1C1C1C) !important; --lwt-accent-color-inactive: light-dark(#e8e8e8, #2e2e2e) !important; --lwt-text-color: light-dark(#000, #E5E5E5) !important; @@ -67,6 +68,13 @@ --tab-icon-overlay-fill: light-dark(#252525, #fff) !important; } +/* ensure that dark mode is enabled completely in private browsing mode. */ +:root[privatebrowsingmode="temporary"], +:root[privatebrowsingmode="temporary"] #nav-bar, +:root[privatebrowsingmode="temporary"] #PersonalToolbar { + color-scheme: dark !important; +} + #urlbar { --urlbar-box-bgcolor: inherit !important; --urlbar-box-hover-bgcolor: inherit !important; From c53c68194be6b6418375d060776a55a791c8fa59 Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:37:44 +0800 Subject: [PATCH 07/10] fix tab shadows --- chrome/global/tweaks.css | 2 +- chrome/toolbar/tabbar.css | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css index 936704e..3acf08f 100644 --- a/chrome/global/tweaks.css +++ b/chrome/global/tweaks.css @@ -143,7 +143,7 @@ bugs with certain themes eg. dark text on dark background.) */ } /* Mica broken on newer versions of Firefox */ -/* Uncomment to enable, only works for Firefox versions lower than 117 */ +/* Uncomment to enable, only works for Firefox versions lower than 115 */ /* @media (-moz-platform: windows) { @supports -moz-bool-pref("uc.tweak.win11-mica") { #main-window:not([inFullscreen]):not(:-moz-lwtheme), diff --git a/chrome/toolbar/tabbar.css b/chrome/toolbar/tabbar.css index f65ffbd..d89f2ad 100644 --- a/chrome/toolbar/tabbar.css +++ b/chrome/toolbar/tabbar.css @@ -392,8 +392,8 @@ toolbarbutton[part="scrollbutton-down"] { 0 2px 4px rgba(0, 0, 0, 0.45), 0 0px 2px rgba(0, 0, 0, 0.2); } -.tabbrowser-tab:is([visuallyselected="true"], [multiselected])>.tab-stack>.tab-background, -#TabsToolbar #firefox-view-button[open]>.toolbarbutton-icon { +#tabbrowser-tabs .tab-background:is([selected], [multiselected]), +#TabsToolbar #firefox-view-button[open] > .toolbarbutton-icon { box-shadow: var(--uc-tab-shadow) !important; } From 8b79ef57c668b9bb469e0f7b9a5f202320b12d49 Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:54:04 +0800 Subject: [PATCH 08/10] Update name at top of files --- chrome/content/common.css | 2 +- chrome/content/newtab.css | 2 +- chrome/global/browser.css | 2 +- chrome/global/colors.css | 2 +- chrome/global/popup.css | 2 +- chrome/global/tweaks.css | 2 +- chrome/icons/icons.css | 2 +- chrome/toolbar/findbar.css | 2 +- chrome/toolbar/navbar.css | 2 +- chrome/toolbar/personalbar.css | 2 +- chrome/toolbar/tabbar.css | 6 +++--- chrome/toolbar/urlbar.css | 2 +- chrome/userChrome.css | 5 ++++- chrome/userContent.css | 2 +- 14 files changed, 19 insertions(+), 16 deletions(-) diff --git a/chrome/content/common.css b/chrome/content/common.css index 469f685..42d7244 100644 --- a/chrome/content/common.css +++ b/chrome/content/common.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox by bmFtZQ - content/common.css */ +/* Edge-FrFox - content/common.css */ /* colours */ @-moz-document url-prefix(about:) { diff --git a/chrome/content/newtab.css b/chrome/content/newtab.css index bec377d..e4e77b8 100644 --- a/chrome/content/newtab.css +++ b/chrome/content/newtab.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox by bmFtZQ - content/newtab.css */ +/* Edge-FrFox - content/newtab.css */ /* colours */ @-moz-document url-prefix("about:newtab"), diff --git a/chrome/global/browser.css b/chrome/global/browser.css index b5572ae..2541dcc 100644 --- a/chrome/global/browser.css +++ b/chrome/global/browser.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox 2 - browser */ +/* Edge-FrFox - browser.css */ @supports (-moz-bool-pref("uc.tweak.floating-tabs")) { :root { diff --git a/chrome/global/colors.css b/chrome/global/colors.css index a9631c1..4f92f12 100644 --- a/chrome/global/colors.css +++ b/chrome/global/colors.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox by bmFtZQ - colors.css */ +/* Edge-FrFox - colors.css */ /* default colours (light & dark) */ :root:not(:-moz-lwtheme), diff --git a/chrome/global/popup.css b/chrome/global/popup.css index 6b8f31d..7eae04c 100644 --- a/chrome/global/popup.css +++ b/chrome/global/popup.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox by bmFtZQ - popup.css */ +/* Edge-FrFox - popup.css */ :root { --panel-subview-body-padding: 2px 0 !important; diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css index 3acf08f..16b3346 100644 --- a/chrome/global/tweaks.css +++ b/chrome/global/tweaks.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox by bmFtZQ - tweaks.css */ +/* Edge-FrFox - tweaks.css */ /* disable drag space above tabs */ @supports -moz-bool-pref("uc.tweak.disable-drag-space") { diff --git a/chrome/icons/icons.css b/chrome/icons/icons.css index 42bda9f..c4854ef 100644 --- a/chrome/icons/icons.css +++ b/chrome/icons/icons.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox by bmFtZQ - icons.css */ +/* Edge-FrFox - icons.css */ /* windows 11 style window controls (no known way to detect between windows 10 and 11 so applied to both) */ diff --git a/chrome/toolbar/findbar.css b/chrome/toolbar/findbar.css index 909b778..f2e47f6 100644 --- a/chrome/toolbar/findbar.css +++ b/chrome/toolbar/findbar.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox by bmFtZQ - findbar.css */ +/* Edge-FrFox - findbar.css */ .findbar-find-previous, .findbar-find-next, diff --git a/chrome/toolbar/navbar.css b/chrome/toolbar/navbar.css index cb6aba3..44500bf 100644 --- a/chrome/toolbar/navbar.css +++ b/chrome/toolbar/navbar.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox by bmFtZQ - navbar.css */ +/* Edge-FrFox - navbar.css */ :root { --toolbarbutton-border-radius: 4px !important; diff --git a/chrome/toolbar/personalbar.css b/chrome/toolbar/personalbar.css index f7127ee..b0f7060 100644 --- a/chrome/toolbar/personalbar.css +++ b/chrome/toolbar/personalbar.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox by bmFtZQ - personalbar.css */ +/* Edge-FrFox - personalbar.css */ #PersonalToolbar { --bookmark-block-padding: 6px !important; diff --git a/chrome/toolbar/tabbar.css b/chrome/toolbar/tabbar.css index d89f2ad..c2170e1 100644 --- a/chrome/toolbar/tabbar.css +++ b/chrome/toolbar/tabbar.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox 2 - tabbar */ +/* Edge-FrFox - tabbar.css */ @supports -moz-bool-pref("uc.tweak.floating-tabs.equal-margin") and -moz-bool-pref("uc.tweak.floating-tabs") { :root #titlebar { @@ -354,12 +354,12 @@ toolbarbutton[part="scrollbutton-down"] { margin-top: calc(2px + var(--tab-block-margin)) !important; } -#tabbrowser-tabs:not([overflow="true"]) .tabbrowser-tab:first-of-type { +/* #tabbrowser-tabs:not([overflow="true"]) .tabbrowser-tab:first-of-type { margin-inline-start: 14px !important; } #tabbrowser-tabs:not([overflow="true"]) .tabbrowser-tab:last-of-type { margin-inline-end: 6px !important; -} +} */ #tabbrowser-tabs { margin-inline-start: -6px !important; diff --git a/chrome/toolbar/urlbar.css b/chrome/toolbar/urlbar.css index 45552b7..5c7e328 100644 --- a/chrome/toolbar/urlbar.css +++ b/chrome/toolbar/urlbar.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox by bmFtZQ - urlbar.css */ +/* Edge-FrFox - urlbar.css */ :root { --urlbar-min-height: 30px !important; diff --git a/chrome/userChrome.css b/chrome/userChrome.css index e6a952b..86de432 100644 --- a/chrome/userChrome.css +++ b/chrome/userChrome.css @@ -1,4 +1,4 @@ -/* EdgeFr-Fox by bmFtZQ */ +/* Edge-FrFox */ @import url("icons/icons.css"); @import url("toolbar/tabbar.css"); @import url("toolbar/navbar.css"); @@ -9,3 +9,6 @@ @import url("global/popup.css"); @import url("global/tweaks.css"); @import url("global/browser.css"); + +/* import custom stylesheet instead of modifying Edge-Frfox theme files */ +@import url("custom.css"); diff --git a/chrome/userContent.css b/chrome/userContent.css index e1bf933..d54608b 100644 --- a/chrome/userContent.css +++ b/chrome/userContent.css @@ -1,3 +1,3 @@ -/* EdgeFr-Fox by bmFtZQ */ +/* Edge-FrFox */ @import url("content/common.css"); @import url("content/newtab.css"); From eba1454367145566ee12120daa6d5eee5501333b Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:56:08 +0800 Subject: [PATCH 09/10] Update names at top of files (fixing typos) --- chrome/content/common.css | 2 +- chrome/content/newtab.css | 2 +- chrome/global/browser.css | 2 +- chrome/global/colors.css | 2 +- chrome/global/popup.css | 2 +- chrome/global/tweaks.css | 2 +- chrome/icons/icons.css | 2 +- chrome/toolbar/findbar.css | 2 +- chrome/toolbar/navbar.css | 2 +- chrome/toolbar/personalbar.css | 2 +- chrome/toolbar/tabbar.css | 6 +++--- chrome/toolbar/urlbar.css | 2 +- chrome/userChrome.css | 2 +- chrome/userContent.css | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/chrome/content/common.css b/chrome/content/common.css index 42d7244..46d324a 100644 --- a/chrome/content/common.css +++ b/chrome/content/common.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - content/common.css */ +/* Edge-Frfox - content/common.css */ /* colours */ @-moz-document url-prefix(about:) { diff --git a/chrome/content/newtab.css b/chrome/content/newtab.css index e4e77b8..399cee2 100644 --- a/chrome/content/newtab.css +++ b/chrome/content/newtab.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - content/newtab.css */ +/* Edge-Frfox - content/newtab.css */ /* colours */ @-moz-document url-prefix("about:newtab"), diff --git a/chrome/global/browser.css b/chrome/global/browser.css index 2541dcc..647a4bd 100644 --- a/chrome/global/browser.css +++ b/chrome/global/browser.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - browser.css */ +/* Edge-Frfox - browser.css */ @supports (-moz-bool-pref("uc.tweak.floating-tabs")) { :root { diff --git a/chrome/global/colors.css b/chrome/global/colors.css index 4f92f12..18737ad 100644 --- a/chrome/global/colors.css +++ b/chrome/global/colors.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - colors.css */ +/* Edge-Frfox - colors.css */ /* default colours (light & dark) */ :root:not(:-moz-lwtheme), diff --git a/chrome/global/popup.css b/chrome/global/popup.css index 7eae04c..73c1976 100644 --- a/chrome/global/popup.css +++ b/chrome/global/popup.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - popup.css */ +/* Edge-Frfox - popup.css */ :root { --panel-subview-body-padding: 2px 0 !important; diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css index 16b3346..d0d40e7 100644 --- a/chrome/global/tweaks.css +++ b/chrome/global/tweaks.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - tweaks.css */ +/* Edge-Frfox - tweaks.css */ /* disable drag space above tabs */ @supports -moz-bool-pref("uc.tweak.disable-drag-space") { diff --git a/chrome/icons/icons.css b/chrome/icons/icons.css index c4854ef..101cea3 100644 --- a/chrome/icons/icons.css +++ b/chrome/icons/icons.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - icons.css */ +/* Edge-Frfox - icons.css */ /* windows 11 style window controls (no known way to detect between windows 10 and 11 so applied to both) */ diff --git a/chrome/toolbar/findbar.css b/chrome/toolbar/findbar.css index f2e47f6..87bb8ba 100644 --- a/chrome/toolbar/findbar.css +++ b/chrome/toolbar/findbar.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - findbar.css */ +/* Edge-Frfox - findbar.css */ .findbar-find-previous, .findbar-find-next, diff --git a/chrome/toolbar/navbar.css b/chrome/toolbar/navbar.css index 44500bf..2517526 100644 --- a/chrome/toolbar/navbar.css +++ b/chrome/toolbar/navbar.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - navbar.css */ +/* Edge-Frfox - navbar.css */ :root { --toolbarbutton-border-radius: 4px !important; diff --git a/chrome/toolbar/personalbar.css b/chrome/toolbar/personalbar.css index b0f7060..0051896 100644 --- a/chrome/toolbar/personalbar.css +++ b/chrome/toolbar/personalbar.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - personalbar.css */ +/* Edge-Frfox - personalbar.css */ #PersonalToolbar { --bookmark-block-padding: 6px !important; diff --git a/chrome/toolbar/tabbar.css b/chrome/toolbar/tabbar.css index c2170e1..6f35217 100644 --- a/chrome/toolbar/tabbar.css +++ b/chrome/toolbar/tabbar.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - tabbar.css */ +/* Edge-Frfox - tabbar.css */ @supports -moz-bool-pref("uc.tweak.floating-tabs.equal-margin") and -moz-bool-pref("uc.tweak.floating-tabs") { :root #titlebar { @@ -354,12 +354,12 @@ toolbarbutton[part="scrollbutton-down"] { margin-top: calc(2px + var(--tab-block-margin)) !important; } -/* #tabbrowser-tabs:not([overflow="true"]) .tabbrowser-tab:first-of-type { +#tabbrowser-tabs:not([overflow="true"]) .tabbrowser-tab:first-of-type { margin-inline-start: 14px !important; } #tabbrowser-tabs:not([overflow="true"]) .tabbrowser-tab:last-of-type { margin-inline-end: 6px !important; -} */ +} #tabbrowser-tabs { margin-inline-start: -6px !important; diff --git a/chrome/toolbar/urlbar.css b/chrome/toolbar/urlbar.css index 5c7e328..91a8a26 100644 --- a/chrome/toolbar/urlbar.css +++ b/chrome/toolbar/urlbar.css @@ -1,4 +1,4 @@ -/* Edge-FrFox - urlbar.css */ +/* Edge-Frfox - urlbar.css */ :root { --urlbar-min-height: 30px !important; diff --git a/chrome/userChrome.css b/chrome/userChrome.css index 86de432..d8692d8 100644 --- a/chrome/userChrome.css +++ b/chrome/userChrome.css @@ -1,4 +1,4 @@ -/* Edge-FrFox */ +/* Edge-Frfox */ @import url("icons/icons.css"); @import url("toolbar/tabbar.css"); @import url("toolbar/navbar.css"); diff --git a/chrome/userContent.css b/chrome/userContent.css index d54608b..3c5ab07 100644 --- a/chrome/userContent.css +++ b/chrome/userContent.css @@ -1,3 +1,3 @@ -/* Edge-FrFox */ +/* Edge-Frfox */ @import url("content/common.css"); @import url("content/newtab.css"); From 296e90f198519aec8cc8f83f7cc170f4d10fd19d Mon Sep 17 00:00:00 2001 From: bmFtZQ <62812711+bmFtZQ@users.noreply.github.com> Date: Sat, 28 Oct 2023 21:12:10 +0800 Subject: [PATCH 10/10] fix theme colors for floating-tabs tweak #106 --- chrome/global/colors.css | 8 +------- chrome/global/tweaks.css | 19 ++++++------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/chrome/global/colors.css b/chrome/global/colors.css index 18737ad..a4219dd 100644 --- a/chrome/global/colors.css +++ b/chrome/global/colors.css @@ -95,13 +95,7 @@ background-color: var(--toolbar-field-focus-background-color) !important; color: var(--toolbar-field-focus-color) !important; border-color: transparent !important; - box-shadow: 0 2px 5px #0004, 0 0 0 1px #0002 !important; -} - -@media (prefers-color-scheme: dark) { - #statuspanel-label { - box-shadow: 0 2px 5px #0004, 0 0 0 1px #0004 !important; - } + box-shadow: 0 2px 5px #0004, 0 0 0 1px light-dark(#0002, #0004) !important; } @media (-moz-platform: windows) { diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css index d0d40e7..baf00d5 100644 --- a/chrome/global/tweaks.css +++ b/chrome/global/tweaks.css @@ -28,21 +28,14 @@ bugs with certain themes eg. dark text on dark background.) */ @supports -moz-bool-pref("uc.tweak.floating-tabs") { :root:not(:-moz-lwtheme), - :root[style*="--lwt-accent-color: rgb(240, 240, 244)"] { - --lwt-accent-color: #f3f3f3 !important; + :root[privatebrowsingmode="temporary"][style*="--lwt-accent-color: rgb(28, 27, 34)"] { + --lwt-accent-color: light-dark(#f3f3f3, #202020) !important; --lwt-accent-color-inactive: unset !important; - --toolbar-bgcolor: #fff !important; - --lwt-tab-text: #262626 !important; + --toolbar-bgcolor: light-dark(#fff, #4D4D4D) !important; + --lwt-tab-text: light-dark(#262626, #fff) !important; + --chrome-content-separator-color: light-dark(#bfbfbf, #535353) !important; --uc-urlbar-shadow: none !important; - } - - :root[lwt-default-theme-in-dark-mode="true"], - :root[style*="--lwt-accent-color: rgb(28, 27, 34)"] { - --lwt-accent-color: #202020 !important; - --toolbar-bgcolor: #4D4D4D !important; - --lwt-accent-color-inactive: unset !important; - --chrome-content-separator-color: #535353 !important; - --uc-tab-border-color: #ffffff0f !important; + --uc-tab-border-color: light-dark(#0000, #fff1) !important; } @media (-moz-gtk-csd-available) {