Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

לאתר זה תהיה פונקציונליות מוגבלת בזמן שאנו מתחזקים אותו לשיפור החוויה שלך. אם מאמר מסויים לא פותר את הבעיה שלך וברצונך לשאול שאלה, קהילת התמיכה שלנו מחכה לעזור לך ב־Twitter תחת ‎@FirefoxSupport וב־Reddit תחת ‎/r/firefox.

חיפוש בתמיכה

יש להימנע מהונאות תמיכה. לעולם לא נבקש ממך להתקשר או לשלוח הודעת טקסט למספר טלפון או לשתף מידע אישי. נא לדווח על כל פעילות חשודה באמצעות באפשרות ״דיווח על שימוש לרעה״.

מידע נוסף

Changing default vertical line spacing in all menus (Firefox 57)?

  • 9 תגובות
  • 2 have this problem
  • 1 view
  • תגובה אחרונה מאת loadlover

more options

What lines should I add to userChrome.css to change the default vertical line spacing in all menus (Firefox 57)? I suppose I really do mean ALL menus, but this particularly applies to the entries in Bookmarks (as selected from the Menu Bar).

Many thanks for your help!

- Loady

What lines should I add to userChrome.css to change the default vertical line spacing in all menus (Firefox 57)? I suppose I really do mean ALL menus, but this particularly applies to the entries in Bookmarks (as selected from the Menu Bar). Many thanks for your help! - Loady

פתרון נבחר

Setting only a negative margin-top and margin-bottom is sufficient for me.

menupopup :-moz-any(menu,menuitem) {
  margin-top:-6px!important;
  margin-bottom:0px!important;
  pading-top:0px!important;
  padding-bottom:0px!important;
}
#bookmarksMenu menupopup :-moz-any(menu,menuitem) {
  margin-top:-4px!important;
  margin-bottom:-4px!important;
}
menupopup :-moz-any(menu:first-child,menuitem:first-child) {margin-top:0px!important;}
menupopup :-moz-any(menu:last-child,menuitem:last-child) {margin-bottom:0px!important;}
Read this answer in context 👍 0

כל התגובות (9)

more options

Hi Loady, this is as tight as I can get with the full size site icons:

#toolbar-menubar .menu-text, #toolbar-menubar .menu-accel-container {
  -moz-appearance: none !important;
  line-height: 16px !important;
  max-height: 16px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-left: 10px !important;
}
#toolbar-menubar .menu-text {
  margin-left: 10px !important;
}
#toolbar-menubar .menu-iconic-left, #toolbar-menubar .menu-iconic-text {
  -moz-appearance: none !important;
  line-height: 16px !important;
  max-height: 16px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
#toolbar-menubar .menu-iconic-left {
  padding-left: 3px !important;
}
#toolbar-menubar .menu-iconic-text {
  padding-left: 7px !important;
}

Some do not shrink as much as others, but I didn't see an immediate explanation.

more options

Thanks, I'll give it a go and let you know. Much appreciated!

- Loady

more options

Hi again,

I tried it, but it seems to have no effect at all.

I created a clean userChrome.css file (in the chrome directory) with the namespace line at the top, and pasted your code in below. I've tested other stuff this way, and it usually works.

I'm using Linux and Firefox 57.0.

Any ideas?

Cheers!

- Loady

more options

Maybe it's the font. I confess limited familiarity with Linux. Do you want to post a screenshot of one of the menus (please cut out or blur any sensitive information in the image before attaching it to your reply using the Browse button below the text box).

more options

Hi again,

Still won't work. Tried in both Linux and Windows.

Have enclosed a screenshot. This is showing the unchanged bookmark menu.

I can't figure it out :(

- Loady

more options

Hi again,

Still won't work. Tried in both Linux and Windows.

Have enclosed a screenshot. This is showing the unchanged bookmarks menu.

I can't figure it out :(

- Loady

more options

That does look like normal spacing. Sorry, I can't explain it.

more options

פתרון נבחר

Setting only a negative margin-top and margin-bottom is sufficient for me.

menupopup :-moz-any(menu,menuitem) {
  margin-top:-6px!important;
  margin-bottom:0px!important;
  pading-top:0px!important;
  padding-bottom:0px!important;
}
#bookmarksMenu menupopup :-moz-any(menu,menuitem) {
  margin-top:-4px!important;
  margin-bottom:-4px!important;
}
menupopup :-moz-any(menu:first-child,menuitem:first-child) {margin-top:0px!important;}
menupopup :-moz-any(menu:last-child,menuitem:last-child) {margin-bottom:0px!important;}
more options

Thanks to both of you for your help.

I just tried cor-el's answer, and it seems to work very nicely. Just had to adjust it a little for my spacing taste ;)

Cheers.

- Loady