阅读:6170回复:29
一个暗黑透明类的菜单样式在proton启用后失效了,能修复吗?
先上图。
一直觉得这个样式非常漂亮,奈何firefox91版本强制启用proton,参数已经无法关闭proton了。而且,启用proton已经是大势所趋了。所以想知道有没有什么办法可以继续使用这个样式,还需要怎么调整吗? #ContentSelectDropdown > menupopup > menuitem[customoptionstyling="true"]{background-color:transparent !important;color:#999999 !important;} menupopup > menuitem, menupopup > menu { padding-block: 0.1em !important; padding-inline-start: 0em !important; } /*menuitem,menu{max-height:26px !important;min-height:26px !important;}*/ #PlacesToolbarItems > .bookmark-item {font-size:13px !important;} menu,menuitem,.splitmenu-menuitem { font-size:16px!important; text-align: left !important; font-family:"Microsoft YaHei UI" !important; } /* SUBMENUS */ popup:not(#autoscroller), menupopup, popup menu, menupopup menu { opacity: 0.95 !important; -moz-appearance: none !important; background: none !important; border: none !important; color: #fff !important; box-shadow: none !important; } menupopup{ padding: 11px 12px 16px !important; } /*.popup-internal-box { margin: 11px 12px 16px !important; }*/ .addon-control.state menupopup {padding:8px 13px 12px 4px !important; } /* MENU ITEMS */ menuitem, .splitmenu-menuitem { opacity: 0.95 !important; -moz-appearance: none !important; border: none !important; color: #fff !important; } /* APP MENU */ #appmenu-popup vbox { background: none !important; border: none !important; box-shadow: none !important; } /* MENUS */ popup:not(#autoscroller), menupopup { border-image-source: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAvCAYAAABAHIylAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAUlSURBVHja7JtPaBRXHMc/781OdnXNqinVlphK4iJoQWiLGIjgLV6UEBFLEcFzLr0JihdB8OjNkwdBWCkKIejFXIKYQkR6CS2Gsv5rjE0sSN11kzWz814P+ya+vMxGL4Xdzfzgx7x9O4edD9/fmzfz+67QWrNeCCGEO9Vg3MyhG4zRnwAg4r53oAgniRm3AhwdM7bnYmGtAWTBiSBI6yiduWa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BbKwHyff/fXC5XtHvzPT09A69evVoAXlJvPZdNuVUxjg+3L58GNlH3/+RM7u3u7s5evnz5j7Nnz75thzXoxo0bXRcvXvx2bm6uQt3dUTJZAZaouz1qQOh2VSPjwiZgi1FSJ9Atpfymv79/4eDBg2+Hh4ffHDlyZLGVoDx48GDz6OjojsePH3dNTU3tVEr9BcwZ1ZRNiS1ZZbZSYo3cHZsNpKzJLdQdZjnzXQfN7VN0787LpnxK1B1m741iKma8GLMG6ZTWOlpwI99ezZwkrW2AMvNVPrZpU6ztqzUroOj3R9dWNWpZdFRju8z05zrMMlZ2NADU7B5FF1AEKcrPcphBY49ilL5J2/XaKgqKHK2ByWUr1/coRntvB5LrcvX52OC3e9nQ/D5p5UCqWVA+7XI1+wRqtVrik6aBT9r3fQAbUuK0jwPkQLJBbez/atiA7HBguUDa/t8+/w0Aop+YsD/C4DEAAAAASUVORK5CYII=") !important; border-image-slice: 15 fill !important; border-image-width: 15px !important; border-image-repeat: repeat !important; } menupopup menupopup { margin-top: -13px !important; } /* SEPARATOR */ menuseparator { -moz-appearance: none !important; list-style-image: none !important; background: none !important; border:solid 0.5px #555 !important; padding-top: 0px !important; padding-bottom: 0px !important; margin-top: 2px !important; margin-bottom: 2px !important; } /* DISABLED ITEM */ menuitem[disabled="true"] { background: none !important; opacity: 0.25 !important; } /* SELECTED ITEM */ popup menu:not([disabled="true"])[_moz-menuactive="true"], menupopup menu:not([disabled="true"])[_moz-menuactive="true"], menuitem:not([disabled="true"])[_moz-menuactive="true"], .splitmenu-menuitem:not([disabled="true"])[_moz-menuactive="true"] { background: -moz-linear-gradient(top, #6f81f5, #3f51f2) repeat-x !important; border-radius: 2px !important; } /* SELECTED ITEM (GRAPHITE) */ popup menu:-moz-system-metric(mac-graphite-theme)[_moz-menuactive="true"], menupopup menu:-moz-system-metric(mac-graphite-theme)[_moz-menuactive="true"], menuitem:not([disabled="true"]):-moz-system-metric(mac-graphite-theme)[_moz-menuactive="true"] { background: -moz-linear-gradient(top, #7f858d, #69717c) repeat-x !important; } /* RIGHT ARROW */ .menu-right { -moz-appearance: none !important; opacity: 0.4 !important; list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAJCAYAAADHP4f4AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAADrSURBVHjatJM9TgMxEEafU6WgSEmRAokG5QQoB8ghKDkEJ9lLpKDMGRAV1UopU6AVBV3QxhWPAls4JoYqlj7J8/fNeGaM2qsLlXNhAlwDz0DH/2cLzCrdAMQ/0KPGAjt12ahonXyeKv1KHSuejL264IRhTIQl0bIgOqj32QagbhpJOoCgxkZrdsBNcb8sbB/AHIghBNQp8ApcFD5vIYQrgMkJcoEX4DbJXZWARPaYhRBCBB5SLMAncPfDePy897IVaev2jVaM6uqouu95RXVNZcgBG3VazaJvJMgYKq6Zuv3dGx3Shpztn3wNABJf62ogSXVRAAAAAElFTkSuQmCC") !important; -moz-image-region: rect(0px 7px 9px 0px) !important; margin-top: 1px !important; } .menu-right[_moz-menuactive="true"] { opacity: 1.0 !important; } /* SCROLL ARROWS */ .autorepeatbutton-up{list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAJCAYAAADHP4f4AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAADrSURBVHjatJM9TgMxEEafU6WgSEmRAokG5QQoB8ghKDkEJ9lLpKDMGRAV1UopU6AVBV3QxhWPAls4JoYqlj7J8/fNeGaM2qsLlXNhAlwDz0DH/2cLzCrdAMQ/0KPGAjt12ahonXyeKv1KHSuejL264IRhTIQl0bIgOqj32QagbhpJOoCgxkZrdsBNcb8sbB/AHIghBNQp8ApcFD5vIYQrgMkJcoEX4DbJXZWARPaYhRBCBB5SLMAncPfDePy897IVaev2jVaM6uqouu95RXVNZcgBG3VazaJvJMgYKq6Zuv3dGx3Shpztn3wNABJf62ogSXVRAAAAAElFTkSuQmCC") !important;-moz-image-region: rect(0px 16px 9px 7px) !important;} .autorepeatbutton-down{list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAJCAYAAADHP4f4AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAADrSURBVHjatJM9TgMxEEafU6WgSEmRAokG5QQoB8ghKDkEJ9lLpKDMGRAV1UopU6AVBV3QxhWPAls4JoYqlj7J8/fNeGaM2qsLlXNhAlwDz0DH/2cLzCrdAMQ/0KPGAjt12ahonXyeKv1KHSuejL264IRhTIQl0bIgOqj32QagbhpJOoCgxkZrdsBNcb8sbB/AHIghBNQp8ApcFD5vIYQrgMkJcoEX4DbJXZWARPaYhRBCBB5SLMAncPfDePy897IVaev2jVaM6uqouu95RXVNZcgBG3VazaJvJMgYKq6Zuv3dGx3Shpztn3wNABJf62ogSXVRAAAAAElFTkSuQmCC") !important;-moz-image-region: rect(0px 25px 9px 16px) !important;} .autorepeatbutton-up, .autorepeatbutton-down { position: relative !important; z-index: 1 !important; opacity: 0.8 !important; background: #333 !important; } .autorepeatbutton-up[disabled="true"], .autorepeatbutton-down[disabled="true"] { opacity: 0.2 !important; } /* CHECKMARK */ menuitem[checked="true"] .menu-iconic-left { -moz-appearance: none !important; opacity: 0.5 !important; height: 16px !important; list-style-image: none !important; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAlElEQVQoFWP8z4AfMOGXZmAgW4EuQxHU7P8MWGDm/59ACJbBJl39HwRacCkIB0s3wsyFmaD4vxQsJP3/LVDBNJg0MBCgzI1AYZCuXUD6/H82TAW9QImf/4uA5P//NghphAmc/2+AJf//X4EsjVDA8N8MrODPf3VcChj+rwMqWY0qjWwCw39joAJLdAWMQDV4AcHIAgCeN8L5Yy1dlAAAAABJRU5ErkJggg==") 2px 0px no-repeat !important; margin-left:3px !important; } menuitem[checked="true"][_moz-menuactive="true"] .menu-iconic-left { opacity: 1.0 !important; } |
|
最新喜欢:aunsen |
1楼#
发布于:2021-08-12 15:23
.menupopup-arrowscrollbox{ background: transparent!important; border: 0!important; } menupopup { -moz-window-shadow: none!important; box-shadow: none!important; } #context-navigation .menu-iconic-icon{ background: transparent!important; } menupopup .menu-text:first-child { margin-inline-start: 24px!important; } .menu-right > image { width: .4em!important; } .menu-iconic-left:not([checked="true"]){ min-width: 1.45em!important; }加上这个。 |
|
2楼#
发布于:2021-08-12 20:41
|
|
3楼#
发布于:2021-08-12 20:53
另外再请教个问题,就是在没有启用其他任何样式的情况下,我想通过以下样式来改变菜单的背景颜色,却发现无论如何都生效不了,我的主题依旧是明亮主题。
:host, :root { --menu-background-color: #f9f9fb !important; --menu-color: #fff !important; } |
|
4楼#
发布于:2021-08-12 21:17
kidzgy:另外再请教个问题,就是在没有启用其他任何样式的情况下,我想通过以下样式来改变菜单的背景颜色,却发现无论如何都生效不了,我的主题依旧是明亮主题。原楼层已经更新。 menupopup { --menuitem-hover-background-color: var(--dark-menuitem-hover-background-color) !important; --menu-background-color: var(--dark-menu-background-color) !important; --menu-color: var(--dark-menu-color) !important; --menu-disabled-color: var(--dark-menu-disabled-color) !important; --menu-border-color: var(--dark-menu-border-color) !important; --menu-icon-opacity: var(--dark-menu-icon-opacity) !important; } |
|
5楼#
发布于:2021-08-12 23:57
这个菜单样式不错,感谢楼主和楼上高人
|
|
6楼#
发布于:2021-08-12 23:59
lonely_8:原楼层已经更新。非常感谢你的解答。 后来发现还是有点瑕疵,左对齐还是太难了。效果是这样的: 得益于你的指导,并且借鉴了https://github.com/black7375/Firefox-UI-Fix/releases的内容,我直接抛弃掉本主题所述的样式。而是改用官方的暗黑色调,并且在官方的基础进行修改,这样的话就能够实现近乎完美的效果。先上效果图: 代码是这样的:如果想要白色边框更粗点,可以将10行-13行的注释去掉。 menuseparator { -moz-appearance: none !important; list-style-image: none !important; background: none !important; border:solid 0.5px #555 !important; padding-top: 0px !important; padding-bottom: 0px !important; } /*.menupopup-arrowscrollbox{ border: 2px solid #fff !important; }*/ menupopup { --menuitem-hover-background-color: rgba(90, 108, 234, 0.95) !important; --menu-background-color: rgba(56, 56, 56, 0.95) !important; --menu-color: #fff !important; --menu-disabled-color: rgba(251, 251, 254, 0.4) !important; --menu-border-color: rgba(255, 255, 255, 1) !important; --menu-icon-opacity: 1.0 !important; border: 1px solid rgba(56, 56, 56, 1) !important; } .menu-right { margin-inline-end: 0.4em !important; } menu,menuitem { font-size:16px!important; font-family:"Microsoft YaHei UI" !important; } :root { --menu-padding: 0.2em; } menupopup > menuitem, menupopup > menu { padding-block: var(--menu-padding) !important; } /* Padding */ :root { --context-menu-background-padding-default: 5px; --context-menu-background-padding: var(--context-menu-background-padding-default); } :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menuitem, :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menu, #blockedPopupDontShowMessage { background-position: left var(--context-menu-background-padding) center !important; padding-inline-start: var(--context-menu-background-padding) !important; } /* Padding - Windows */ @media (-moz-os-version: windows-win7 ), (-moz-os-version: windows-win8 ), (-moz-os-version: windows-win10) { :root { --context-menu-background-padding: 0.5em; --context-menu-text-padding: calc(var(--menu-padding) + var(--context-menu-background-padding-default) + 16px); } :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist), :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist), #blockedPopupDontShowMessage { padding-inline-start: calc(var(--context-menu-background-padding) + var(--context-menu-text-padding)) !important; } /* Checkbox */ :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menuitem[type="checkbox"][checked="false"] > .menu-iconic-left { padding-inline-start: var(--context-menu-text-padding); } } |
|
7楼#
发布于:2021-08-14 14:30
|
|
8楼#
发布于:2021-08-14 14:36
kidzgy:再请教个问题,像修改这些浏览器界面的css,有没有办法实时反映效果?UC 脚本 https://github.com/xiaoxiaoflood/firefox-scripts https://raw.githubusercontent.com/xiaoxiaoflood/firefox-scripts/master/chrome/styloaix.zip |
|
9楼#
发布于:2021-08-14 15:11
lonely_8:UC 脚本 https://github.com/xiaoxiaoflood/firefox-scripts有个很要命的问题,替换掉config.js后,我的AnotherButton.uc用不了了 链接:https://pan.baidu.com/s/1jOyqaBthbkfbuBa8AYqbiw 提取码:aaaa |
|
10楼#
发布于:2021-08-14 15:53
kidzgy:有个很要命的问题,替换掉config.js后,我的AnotherButton.uc用不了了这脚本本来就用不了的吧? 1. toSource 替换为 toString 2. 注释或者删掉 saveFile(aFile, ''); 这一行,初次使用时 _anoBtn.js 配置文件改为手动创建吧。 |
|
11楼#
发布于:2021-08-14 16:18
lonely_8:这脚本本来就用不了的吧?抱歉,忘了上传配置文件。 这个是配置文件:链接:https://pan.baidu.com/s/13tY7DJKZLQKGjbZT96gSJw 提取码:aaaa 这个脚本之前是能用的 在此之前的config.js文件配置是这样的 try { Components.utils.import("resource://gre/modules/osfile.jsm"); Components.utils.import("resource://gre/modules/Services.jsm"); function UserChrome_js() { var os = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); os.addObserver(this, "final-ui-startup", false); }; UserChrome_js.prototype = { observe: function(aSubject, aTopic, aData) { var os = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); switch (aTopic) { case "final-ui-startup": var file = Components.classes["@mozilla.org/file/directory_service;1"] .getService(Components.interfaces.nsIProperties) .get("UChrm", Components.interfaces.nsIFile); file.append("userChrome.js"); if (file.exists() && file.isFile() && !Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIXULRuntime) .inSafeMode) { this.mFileURL = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService) .getProtocolHandler("file") .QueryInterface(Components.interfaces.nsIFileProtocolHandler) .getURLSpecFromFile(file); var path = OS.Constants.Path.libDir; path = OS.Path.join(path, "userChromeJS.js"); this.uCFileURI = OS.Path.toFileURI(path); os.addObserver(this, "domwindowopened", false); var blankWindow = Services.wm.getMostRecentWindow("navigator:blank"); blankWindow && blankWindow.addEventListener("load", this, true); } break; case "domwindowopened": aSubject.addEventListener("load", this, true); break; } }, handleEvent: function(aEvent) { var document = aEvent.originalTarget; if (document.location && document.location.protocol == "chrome:") { try { let loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getService(Components.interfaces.mozIJSSubScriptLoader); loader.loadSubScript(this.uCFileURI, document.defaultView, "UTF-8"); loader.loadSubScript(this.mFileURL, document.defaultView, "UTF-8"); } catch (ex) { if (ex !== "stop") { Components.utils.reportError(ex); } } } } }; new UserChrome_js(); } catch(ex) { Components.utils.reportError(ex); }; |
|
12楼#
发布于:2021-08-14 16:23
kidzgy:抱歉,忘了上传配置文件。如你所述修改,在用了xiaoxiaoflood的config文件后依旧不可用。 |
|
13楼#
发布于:2021-08-14 17:57
最终效果图:
:root { --menu-padding: 0.2em !important; /*浏览器文字菜单间距*/ --context-menu-background-padding: 0.5em !important; /*含图标+文字所有菜单间距*/ --context-menu-text-padding: 1.5em !important;/*浏览器文字菜单间距*/ } menupopup { --menuitem-hover-background-color: rgba(90, 108, 234, 1) !important; --menu-background-color: rgba(60, 60, 60, 1) !important; --menu-color: #fff !important; --menu-disabled-color: rgba(251, 251, 254, 0.4) !important; --menu-border-color: rgba(255, 255, 255, 1) !important; --menu-icon-opacity: 1.0 !important; border: 1px solid rgba(56, 56, 56, 1) !important; } .menupopup-arrowscrollbox{ border: 2px solid rgba(255, 255, 255, 1) !important; } :not(menu, #ContentSelectDropdown, #context-navigation, #viewButton) > menupopup > menuitem, :not(menu, #ContentSelectDropdown, #context-navigation, #viewButton) > menupopup > menu, menuitem[checked="true"], menuitem.menuitem-iconic, menu.menu-iconic, #blockedPopupDontShowMessage { background-position: left 0.5em center !important; padding-inline-start: 0.5em !important; } :not(menu, #ContentSelectDropdown, #context-navigation, #viewButton) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist,.unified-nav-current), :not(menu, #ContentSelectDropdown, #context-navigation, #viewButton) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist,.unified-nav-current), menupopup:not(.in-menulist) > menuitem:not([checked="true"],.menuitem-iconic), menupopup:not(.in-menulist) > menu:not(.menu-iconic), #blockedPopupDontShowMessage { padding-inline-start: 2em !important; } /*复选框间距*/ :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menuitem[type="checkbox"]:not([checked="true"]) > .menu-iconic-left { padding-inline-start: 1.5em !important; } /*调大字体*/ menu,menuitem { font-size:16px!important; font-family:"Microsoft YaHei UI" !important; } /*分隔线*/ menuseparator { -moz-appearance: none !important; list-style-image: none !important; background: none !important; border:solid 0.5px #555 !important; padding-top: 0px !important; padding-bottom: 0px !important; } /*菜单上下间距*/ menupopup > menuitem, menupopup > menu { padding-block: 0.2em !important; } /*子菜单箭头*/ .menu-right { margin-inline-end: 0.4em !important; } |
|
14楼#
发布于:2021-08-14 18:52
|
|
上一页
下一页