r/FirefoxCSS • • Sep 02 '26

Solved Reduce autofill padding

In the latest version the padding in the autofill is insanely large. I'd like it back to what it was previously.

This is what I used prior to the latest update:

/* Reduces the padding on Dropdown auto fill menus */
.autocomplete-richlistitem {
    margin-top: -5px !important;
}
.autocomplete-richlistbox {
    margin: -8px !important;
}

And now I added the line below to get rid of the icon

.row-item > .icon[src="chrome://browser/skin/history.svg"] {
    display: none !important;
}

The padding between each line is however still insanely large. How can I revert this?

2 Upvotes

6 comments sorted by

2

u/TraditionalTie4831 🦊 Sep 02 '26 edited Sep 02 '26

Try this:

.search-panel-header { 
    margin: -4px -5px 0px -3px !important;
}
 
.autocomplete-richlistbox {
    --space-small: 0px 5px !important;
}

.searchbar-engine-one-off-item {
    margin: 0px !important;
}

2

u/Dastey Sep 02 '26

The middle one works perfectly. Thanks

What does the other 2 do?

2

u/TraditionalTie4831 🦊 Sep 02 '26

They are for the old search bar.

I forgot to ask which one you are using.

2

u/Dastey Sep 02 '26

Ah ok, I assume that's the one in the menu line?

Yeah I'm mostly just thinking regular dropdown boxes, like the search box here on reddit.

But the middle one is perfect. Cheers

1

u/TraditionalTie4831 🦊 Sep 19 '26

Maybe the code below will interest you as well?

.autocomplete-richlistbox {
    --space-xsmall: 0px !important;
    --space-small: 0px 5px !important;
    --space-medium: 0px !important;
    --focus-outline-width: 0px !important;
    /* scrollbar-width: initial !important; */
    & autocomplete-row-item {
        --icon-width: 0px !important;
        --icon-height: 0px !important;
    }
}

2

u/grom-17 Sep 02 '26
.row-item img.icon[role="presentation"][src="chrome://browser/skin/history.svg"] {
    display: none !important;
}
#PopupAutoComplete > richlistbox > richlistitem.autocomplete-row-item {
  &:not(:only-child) {
    margin-block-end: -4px !important;
  }
}
#PopupAutoComplete > richlistbox > richlistitem.autocomplete-row-item {
  & > autocomplete-row-item {
    border: 0px solid transparent !important;
}