搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How do I hide the icon of one bookmark in the bookmark toolbar in userChrome.css?

more options

I have one bookmark in the bookmark toolbar (the "Read Later" bookmarklet for Instapaper, not that that should matter) which does not have an icon, and I would like to hide the little dashed rounded-square placeholder for bookmarks which don't have an icon.

Right now, in my userChrome.css I have this:

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /*only needed once*/

  1. personal-bookmarks toolbarbutton.bookmark-item[label="Read Later"]

{ display: none; }

Unfortunately, it's not working. Any ideas?

I have one bookmark in the bookmark toolbar (the "Read Later" bookmarklet for Instapaper, not that that should matter) which does not have an icon, and I would like to hide the little dashed rounded-square placeholder for bookmarks which don't have an icon. Right now, in my userChrome.css I have this: @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /*only needed once*/ #personal-bookmarks toolbarbutton.bookmark-item[label="Read Later"] { display: none; } Unfortunately, it's not working. Any ideas?

所有回覆 (5)

more options

It should read `#personal-bookmarks toolbarbutton...`

more options

This should work to hide the icon for a specific bookmark.

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */

#personal-bookmarks .bookmark-item[label="Read Later"] .toolbarbutton-icon { display:none!important; }
more options

Unfortunately this does not do anything on my machine. Is there something I could do / put in my useChrome.css file to test that Firefox is reading my userChrome.css file at all?

Thank you cor-el.

more options

Did you restart? I think Firefox only reads that file at startup. For tinkering with style rules, you might find it easier to use the Stylish extension because its Preview button lets to see your results instantly. You don't have to keep it if you only are making this one rule, but remember to copy out your rule to userChrome.css before uninstalling.

more options

This is off topic, but...

When I looked at those bookmarks toolbar items (using the DOM Inspector's feature of inspecting a Chrome document) I realized I could get rid of the square outlines for all my bookmarklets. :-) I settled on blue bullets for them.

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
#personal-bookmarks .bookmark-item[scheme="javascript"] .toolbarbutton-icon {
  width:6px !important;
  height:6px !important;
  background-color:#00f !important;
  border-radius:3px !important;
}