修复FireFox中的双间距菜单
介绍
FireFox中的下拉菜单在相当长的一段时间内都是双倍间隔的。这可能很烦人,因为它需要更多的滚动来查看菜单内容,而不是必要的。本文档介绍如何覆盖此功能。
[菜单间距前后][1]
出身背景
你可以把这归咎于Mozilla的一些天才,他们认为这是个好主意。在FireFox 91+之前,你一直都有一种方法可以超越这种闪光。这是通过设置
浏览器质子启用=错误
在about:config FireFox页面上
自FireFox 91+;这已经不起作用了。显然,同样的天才又出现了。现在,下面的代码需要添加到userChrome中。css文件位于默认@namespace行下方,需要在about:config页面中设置一个参数。稍后再谈。
menupopup > menuitem, menupopup > menu {padding-top: 2px !important; padding-bottom: 2px !important;}
*|*:root {--arrowpanel-menuitem-padding: 2px 8px !important;}
```
________________________________________
FYI: References to âChromeâ you will see throughout this document have nothing to do with Googleâs Chrome browser.
The following assumes you will be creating a new userChrome.css file and latching it into FireFox. Modifying an existing userChrome.css file should become self-evident once you navigate to your FireFox profile folder. Three basic steps are required.
⢠Creating a directory for the userChrome.css file.
⢠Creating the userChrome.css file
⢠Latching the userChrome.css file into FireFox
Creating a Directory for userChrome.css
The userChrome.css file lives in a directory in your FireFox profile called âchromeâ (all lower case). You will need to create this directory if not already there.
In FireFox, click on the hamburger in the upper right corner and open the "Help -> More Troubleshooting Information" page. Then find the button to open your profile folder in the Application Basics Section.
[Ope Profile Folder][2]
Pressing this button will bring up File Explorer opened to your profile folder .
Create a folder and name it âchromeâ, all lower case, and navigate into it. Leave the File Explorer open for now.
[Profile Folder][3]
Creating userChrome.css
If there is not a userChrome.css file already available; you can use the code provided to create one. When copying the code from above; you need to paste into a simple text editor such as NotePad, and save it from there. This will eliminate any unprintable Word formatting characters that may be in the original.
There is a chance your editor will have a hard time navigating to the âchromeâ directory you just created. Especially if âAppDataâ in the path to your âchromeâ folder is hidden. Save the text in your editor using âSave File Asâ, to a file named âuserChrome.cssâ on your desk top. Case is important.
Now drag âuserChrome.cssâ from the desk top to the open âchromeâ folder in File Explorer.
Latching userChrome.css into FireFox
Making FireFox aware of the new userChrome requires a preference to be set. In particular, parameter âtoolkit.legacyUserProfileCustomizations.stylesheetsâ needs to be set to âtrueâ.
To do this enter âabout:configâ in the address bar, press return, and accept the risks.
Be aware messing with the parameters can be like fooling around with the control rods in a nuclear reactor. One slip up can result in a meltdown. Donât mess with any of the other parameters unless you know what you are doing.
[Accept Risk Button][4]
Enter âtoolkit.legacyâ in the search that comes up and press return.
Now press the double arrow to set this parameter to âtrueâ
[setting parameter][5]
The parameter is set as soon as you change it. There is no âSaveâ or âUpdateâ button to press.
You are all set. Sign out of FireFox and back in. (I also reset my machine as a placebo measure.) Display your book marks. They should be single spaced.
Nirvana
[1]: https://i.stack.imgur.com/NH6Lr.png
[2]: https://i.stack.imgur.com/obBKD.png
[3]: https://i.stack.imgur.com/qjJXJ.png
[4]: https://i.stack.imgur.com/CnUec.png
[5]: https://i.stack.imgur.com/iap1C.png