From e4e54bc1a5fd31e30fa0df88d3d3b5ed69f16a64 Mon Sep 17 00:00:00 2001 From: bmFtZQ Date: Mon, 16 May 2022 16:21:12 +0800 Subject: [PATCH] add "tweaks" customisation --- README.md | 23 +++++++++++++++++++++++ chrome/global/popup.css | 6 ------ chrome/global/tweaks.css | 35 +++++++++++++++++++++++++++++++++++ chrome/userChrome.css | 20 +------------------- 4 files changed, 59 insertions(+), 25 deletions(-) create mode 100644 chrome/global/tweaks.css diff --git a/README.md b/README.md index 872556a..bb52f40 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,29 @@ A Firefox userChrome.css theme that aims to recreate the look and feel of the Ch **Note: Most frequently tested on macOS** +## Tweaks +Certain tweaks can be applied to the theme, to enable them navigate to `about:config` and create a boolean key for each tweak and set it to `true` and restart the browser. + +To disable a tweak, set the key to false or delete it and restart the browser. + +|disable drag space above tabs| +|-| +|`uc.tweak.disable-drag-space`| + +|force tab background colour to `--toolbar-bg` (useful for Proton themes)| +|-| +|**NOTE: can cause readability issues with some themes! (eg. white text on white bg)**| +|`uc.tweak.force-tab-colour`| + +|only show Firefox account button when in private mode (useful as a private browsing indicator)| +|-| +|**NOTE: all functionality of this button can still be accessed from the app menu.**| +|`uc.tweak.fxa-button-as-private-indicator`| + +|remove tab separators| +|-| +|`uc.tweak.remove-tab-separators`| + ## Acknowledgements [muckSponge](https://github.com/muckSponge) - [MaterialFox](https://github.com/muckSponge/MaterialFox) diff --git a/chrome/global/popup.css b/chrome/global/popup.css index 26d2a2c..11da2f2 100644 --- a/chrome/global/popup.css +++ b/chrome/global/popup.css @@ -215,12 +215,6 @@ } /* auto complete popup */ -menupopup, -panel[type="autocomplete-richlistbox"] { - /* -moz-window-shadow: none !important; */ - appearance: none !important; -} - #PopupAutoComplete>.autocomplete-richlistbox { background: var(--arrowpanel-background) !important; color: var(--arrowpanel-color) !important; diff --git a/chrome/global/tweaks.css b/chrome/global/tweaks.css new file mode 100644 index 0000000..f603c9d --- /dev/null +++ b/chrome/global/tweaks.css @@ -0,0 +1,35 @@ +/* EdgeFr-Fox by bmFtZQ - tweaks.css */ + +/* disable drag space above tabs */ +@supports -moz-bool-pref("uc.tweak.disable-drag-space") { + :root #titlebar { + --tab-block-margin: 0px !important; + } +} + +/* force tabs to toolbar bg (useful for proton themes) (might experience some +bugs with certain themes eg. dark text on dark background.) */ +@supports -moz-bool-pref("uc.tweak.force-tab-colour") { + :root { + --lwt-selected-tab-background-color: unset !important; + } +} + +/* hide firefox account button when not in private mode (useful as a private +browsing indicator) */ +@supports -moz-bool-pref("uc.tweak.fxa-button-as-private-indicator") { + :root:not([privatebrowsingmode]) #nav-bar:not([customizing]) #fxa-toolbar-menu-button { + display: none !important; + } +} + +/* remove tab separators */ +@supports -moz-bool-pref("uc.tweak.remove-tab-separators") { + .tabbrowser-tab:not([selected="true"], :hover, [beforeselected-visible], [beforehovered]) .tab-stack::after { + display: none !important; + } + + .tabbrowser-tab:not([last-visible-tab="true"]) { + margin-inline-end: 0px !important; + } +} diff --git a/chrome/userChrome.css b/chrome/userChrome.css index a013e34..1053b75 100644 --- a/chrome/userChrome.css +++ b/chrome/userChrome.css @@ -7,22 +7,4 @@ @import url("toolbar/urlbar.css"); @import url("global/colors.css"); @import url("global/popup.css"); - -/* tweaks */ - -/* disable drag space above tabs */ -/* :root #titlebar { - --tab-block-margin: 0px !important; -} */ - -/* force tabs to toolbar bg (useful for proton themes) (might experience some -bugs with certain themes eg. dark text on dark background.) */ -:root { - --lwt-selected-tab-background-color: unset !important; -} - -/* hide firefox account button when not in private mode (useful as a private -browsing indicator) */ -/* :root:not([privatebrowsingmode]) #nav-bar:not([customizing]) #fxa-toolbar-menu-button { - display: none !important; -} */ +@import url("global/tweaks.css");