Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Learn More

Style selected item from url autocomplete dropdownuserChrome.css

  • 2 απαντήσεις
  • 4 έχουν αυτό το πρόβλημα
  • 1 προβολή
  • Τελευταία απάντηση από ecly

more options

I'm running a failry customized userChrome.css with Firefox but can't seem to figure out how to eg. change the background color of the selected item from the autocomplete dropdown presented when typing in the URL bar.

I've used DOM inspector and see that they are are all of type '.autocomplete-richlistitem'. I've tried modifying them with 'active', 'focus' etc. but have no luck. I have it working such that my style is applied when I hover them, but when I use the arrow keys to select one of them I can't seem to get any style to apply, and I haven't been able to figure out what attribute defines the selected item using the DOM Inspector.

Anyone know the CSS required to style these?

I'm running a failry customized userChrome.css with Firefox but can't seem to figure out how to eg. change the background color of the selected item from the autocomplete dropdown presented when typing in the URL bar. I've used DOM inspector and see that they are are all of type '.autocomplete-richlistitem'. I've tried modifying them with 'active', 'focus' etc. but have no luck. I have it working such that my style is applied when I hover them, but when I use the arrow keys to select one of them I can't seem to get any style to apply, and I haven't been able to figure out what attribute defines the selected item using the DOM Inspector. Anyone know the CSS required to style these?

Επιλεγμένη λύση

The DOM Inspector shows these two attributes for an .autocomplete-richlistitem when I use the cursor down key:

  • selected = true
  • current = true

chrome://browser/skin/browser.css

.autocomplete-richlistitem {
  height: 30px;
  min-height: 30px;
  font: message-box;
  border-radius: 2px;
  border: 1px solid transparent;
}

.autocomplete-richlistitem:hover,
treechildren.searchbar-treebody::-moz-tree-row(hover) {
  background-color: hsla(0, 0%, 0%, 0.06);
  border-color: hsla(0, 0%, 0%, 0.1);
}

.autocomplete-richlistitem[selected],
treechildren.searchbar-treebody::-moz-tree-row(selected) {
  background-color: Highlight;
}
Ανάγνωση απάντησης σε πλαίσιο 👍 0

Όλες οι απαντήσεις (2)

more options

Επιλεγμένη λύση

The DOM Inspector shows these two attributes for an .autocomplete-richlistitem when I use the cursor down key:

  • selected = true
  • current = true

chrome://browser/skin/browser.css

.autocomplete-richlistitem {
  height: 30px;
  min-height: 30px;
  font: message-box;
  border-radius: 2px;
  border: 1px solid transparent;
}

.autocomplete-richlistitem:hover,
treechildren.searchbar-treebody::-moz-tree-row(hover) {
  background-color: hsla(0, 0%, 0%, 0.06);
  border-color: hsla(0, 0%, 0%, 0.1);
}

.autocomplete-richlistitem[selected],
treechildren.searchbar-treebody::-moz-tree-row(selected) {
  background-color: Highlight;
}
more options

cor-el said

The DOM Inspector shows these two attributes for an .autocomplete-richlistitem when I use the cursor down key:
  • selected = true
  • current = true
chrome://browser/skin/browser.css
.autocomplete-richlistitem {
  height: 30px;
  min-height: 30px;
  font: message-box;
  border-radius: 2px;
  border: 1px solid transparent;
}

.autocomplete-richlistitem:hover,
treechildren.searchbar-treebody::-moz-tree-row(hover) {
  background-color: hsla(0, 0%, 0%, 0.06);
  border-color: hsla(0, 0%, 0%, 0.1);
}

.autocomplete-richlistitem[selected],
treechildren.searchbar-treebody::-moz-tree-row(selected) {
  background-color: Highlight;
}

That did the trick! Couldn't seem to derive that same information myself! Thanks a lot!