Skip to content

Commit

Permalink
Fix issue with dark private browsing theme.
Browse files Browse the repository at this point in the history
When changing the browser theme, switching back to the default,
sometimes the colour scheme is wrong in private windows.
  • Loading branch information
bmFtZQ committed Dec 24, 2023
1 parent 2d35f80 commit c4d1cbc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ Removes the underlining or highlighting of certain characters in the context
menu. These underlines correspond to the key that when pressed, activates the
item.

For example, "<u>U</u>ndo" becomes "Undo" and "Inspect (Q)" becomes "Inspect".
<!-- Using <ins> for underline as GitHub does not support <u>. -->
For example, "<ins>U</ins>ndo" becomes "Undo" and "Inspect (Q)" becomes
"Inspect".

`uc.tweak.context-menu.hide-access-key`

Expand Down
10 changes: 6 additions & 4 deletions chrome/global/colors.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* Edge-Frfox - colors.css */
/* Edge-Frfox - colors.css
* https://github.com/bmFtZQ/edge-frfox */

/* default colours (light & dark) */
:root:not(:-moz-lwtheme),
/* `--newtab-background-color-secondary used` to differentiate between a dark
* private window and private window with the 'Dark' theme enabled.
* May not be the most reliable method, but works for now up to FF 123.
*/
* May not be the most reliable method, but works for now up to FF 123. */
:root[privatebrowsingmode="temporary"][style*="--lwt-accent-color: rgb(28, 27, 34)"]:not([style*="--newtab-background-color-secondary: rgb(66, 65, 77)"]) {
--lwt-accent-color: light-dark(#cecece, #1C1C1C) !important;
--lwt-accent-color-inactive: light-dark(#e8e8e8, #2e2e2e) !important;
Expand Down Expand Up @@ -81,7 +81,7 @@
--uc-private-browsing-indicator-text: var(--button-primary-color);
--tab-icon-overlay-stroke: light-dark(#fff, #4b4b4b) !important;
--tab-icon-overlay-fill: light-dark(#252525, #fff) !important;
--toolbarseparator-color: color-mix(in srgb, currentColor 40%, transparent) !important;
--toolbarseparator-color: color-mix(in srgb, currentColor 25%, transparent) !important;

/* Side bar theme colours. */
--sidebar-background-color: light-dark(#f7f7f7, #3b3b3b) !important;
Expand Down Expand Up @@ -116,6 +116,8 @@
:root[privatebrowsingmode="temporary"],
:root[privatebrowsingmode="temporary"] #nav-bar,
:root[privatebrowsingmode="temporary"] #PersonalToolbar {
--toolbar-color-scheme: dark !important;
--tab-selected-color-scheme: dark !important;
color-scheme: dark !important;
}
}
Expand Down

0 comments on commit c4d1cbc

Please sign in to comment.