Bookmarks toolbar folders

User Help for Mozilla Firefox
Post Reply
User avatar
dfoulkes
Posts: 22525
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Bookmarks toolbar folders

Post by dfoulkes »

Prior to updating to Quantum I was able to have specific colors for folders on the toolbar. Plus I had an extension that when placing the mouse pointer over a folder it would display its name. Both of those options are now gone. I do have a number of colored folders in my Chrome folder that were used in the past.... So,

I'll assume that now code is needed in one of the userChrome files to get my folder ids back... anybody know of what it should look like?

I've done some searching in some sites for code that others have developed but could not find one for folders and their colors. I do know that each line of code would need to target a specific folder... no big deal because once I had one working I could just dup the code and change the required target folder.

I did find code that gives a nice rounded tab and highlights the open tab in a nice way.

Also, if anybody has code to 'reduce' the space between bookmarks on the bar it would be very much appreciated. I've already tried the compact options within the Customize window ... no change.
As you can see she's (The CAT) always alert and on the prowl for Meoware !!
User avatar
Grumpus
Posts: 13239
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: Bookmarks toolbar folders

Post by Grumpus »

Can you clarify this a little?
Are you referring to the Bookmarks Toolbar or are you referring to the drop down from the Bookmarks in the Menu bar?
Also, with this current 63 I'm showing color in both places with the exception of the main folders on the drop down which are all simple no color icons but the bookmarks underneath each are colored.
This is with the default theme, Renaissance or Space Fantasy themes.
I have very little code in the userChrome.css file
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
User avatar
dfoulkes
Posts: 22525
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Re: Bookmarks toolbar folders

Post by dfoulkes »

Thanks for the feedback, just the bar... I have about 12 folders up there and I used to have an extension that would allow me to store folder icons in my system that I got off the net and then I could right click on one of those folders and change the icon.
As you can see she's (The CAT) always alert and on the prowl for Meoware !!
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Bookmarks toolbar folders

Post by jscher2000 »

For userChrome.css purposes, this is the structure:

Code: Select all

<toolbarbutton class="bookmark-item" label="Folder Name" type="menu" container="true" style="visibility: visible;">
  <menupopup placespopup="true" context="placesContext"/>
  <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label,type,consumeanchor,triggeringprincipal=iconloadingprincipal" xmlns:xbl="http://www.mozilla.org/xbl" type="menu" label="Folder Name"/>
  <xul:label class="toolbarbutton-text" crop="right" flex="1" xbl:inherits="value=label,accesskey,crop,dragover-top,wrap" xmlns:xbl="http://www.mozilla.org/xbl" value="Folder Name"/>
</toolbarbutton>
So you can target individual folders using the Folder Name, for example, to get rid of the text labels for the "Fx" and "Misc" folders and color their folder icons red and green. I don't know how to create a tooltip, so this just reveals the text label on hover.

Code: Select all

/* Hide folder text label(s) except when hovered */
toolbarbutton.bookmark-item[label="Fx"]:not(:hover) > .toolbarbutton-text, 
toolbarbutton.bookmark-item[label="Misc"]:not(:hover) > .toolbarbutton-text {
  visibility: collapse !important;
}
/* Make Fx folder red */
toolbarbutton.bookmark-item[label="Fx"] > .toolbarbutton-icon {
  fill: red !important;
}
/* Make Misc folder green */
toolbarbutton.bookmark-item[label="Misc"] > .toolbarbutton-icon {
  fill: green !important;
}
As you can seen, this tends to pile up, but if you have a moderate number of folders with stable names, it's not too bad.
User avatar
dfoulkes
Posts: 22525
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Re: Bookmarks toolbar folders

Post by dfoulkes »

jscher2000

Thankyou for that code. Long ago I managed systems in both a Children's Hosp. and a real-time national fueling network... in both cases I wrote special code using the tools associated with each systems OS format...similar to what we are looking at here...but that was long ago and I'm now out of the business, so, it's all Greek to me now ](*,)

Anyway, is the first set (part 1) of coding used to 'set up' (part 2)? That's what it looks like to me.

Right now I have 18 folders up there on my tool-bar and they don't change. There are there to place certain bookmarks 'within' them... like one may be named 'Buying' and it contains stuff like Ebay, Costco, Amazon etc... and say... another one would be for various Insurance sites. It's just a way for me to have it all in front of me and once I set up the css code in the Chrome file it won't get changed.

And BTW ... I've visited a number of other boards looking for answers to other types of questions and I note that you post on those sites too... you are a very hard working volunteer... so, thankyou for all you do.
As you can see she's (The CAT) always alert and on the prowl for Meoware !!
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Bookmarks toolbar folders

Post by jscher2000 »

Hi dfoulkes, thank you for your kind words.

The first code box is just showing the XUL so you can be inspired on how to write CSS rules to target it. Don't paste that into userChrome.css.

In my example code in the second box, change "Fx" to "Buying" (or whatever the real name is0 and see how that works for your folder.
Post Reply