From fe225ee5ec18df9983220a9092698078e50817dd Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sat, 26 Jun 2021 14:23:39 +0300 Subject: [PATCH] create menupopups_forced_color_schemes.css --- chrome/menupopup_forced_color_schemes.css | 36 +++++++++++++++++++++++ html_resources/tagmap.json | 3 +- tags.csv | 1 + 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 chrome/menupopup_forced_color_schemes.css diff --git a/chrome/menupopup_forced_color_schemes.css b/chrome/menupopup_forced_color_schemes.css new file mode 100644 index 0000000..51e8a35 --- /dev/null +++ b/chrome/menupopup_forced_color_schemes.css @@ -0,0 +1,36 @@ +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/menupopup_forced_color_schemes.css made available under Mozilla Public License v. 2.0 +See the above repository for updates as well as full license text. */ + +/* This only works on Windows10 when the proton-style context menus are used. + * Purpose of this style is to force either dark or light version of menus + * regardless of the Firefox theme you have. + * This does NOTHING unless you go to about:config and create a new boolean pref + * "userchrome.menupopups.force-light" (or "-dark" for dark version) and set it true. + * + * If both are set true then dark version is used. + * If both are set false then normal Firefox behavior is used (so your theme selects it) + * Changes to the prefs WON'T APPLY before Firefox is restarted. +*/ + +@supports -moz-bool-pref("userchrome.menupopups.force-light"){ + menupopup{ + --menuitem-hover-background-color: #e0e0e6 !important; + --menu-background-color: #f9f9fb !important; + --menu-color: #15141a !important; + --menuitem-disabled-hover-background-color: rgba(224, 224, 230, 0.4) !important; + --menu-disabled-color: rgba(21, 20, 26, 0.4) !important; + --menu-border-color: #cfcfd8!important; + --menu-icon-opacity: 0.7 !important; + } +} +@supports -moz-bool-pref("userchrome.menupopups.force-dark"){ + menupopup{ + --menuitem-hover-background-color: #52525e !important; + --menu-background-color: #2b2a33 !important; + --menu-color: #fbfbfe !important; + --menuitem-disabled-hover-background-color: rgba(82, 82, 94, 0.4) !important; + --menu-disabled-color: rgba(251, 251, 254, 0.4) !important; + --menu-border-color: #5b5b66 !important; + --menu-icon-opacity: 1 !important; + } +} \ No newline at end of file diff --git a/html_resources/tagmap.json b/html_resources/tagmap.json index 6e013a4..4a15f53 100644 --- a/html_resources/tagmap.json +++ b/html_resources/tagmap.json @@ -135,5 +135,6 @@ "window_control_fallback_for_custom_windows_theme.css":["window-control","buttons","colors","patch"], "window_control_placeholder_support.css":["window-control","patch"], "loading_indicator_bouncing_line.css":["status","navigation","effect"], -"loading_indicator_rotating_image.css":["navigation","effect","status"] +"loading_indicator_rotating_image.css":["navigation","effect","status"], +"menupopup_forced_color_schemes.css":["popup","colors","menu"] } diff --git a/tags.csv b/tags.csv index b4e2b14..f606949 100644 --- a/tags.csv +++ b/tags.csv @@ -135,3 +135,4 @@ window_control_fallback_for_custom_windows_theme.css,window-control,buttons,colo window_control_placeholder_support.css,window-control,patch loading_indicator_bouncing_line.css,status,navigation,effect loading_indicator_rotating_image.css,navigation,effect,status +menupopup_forced_color_schemes.css,popup,colors,menu