Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Highlighting or color-coding folder names

282 views
Skip to first unread message

Rich Pasco

unread,
Jan 8, 2008, 8:44:09 AM1/8/08
to
My list of folder names in my folder pane is getting pretty long.
It would be nice to color code them (or highlight them) to make
it easier to find certain folders. Is there a way to do that?

- Rich

Tony Mechelynck

unread,
Jan 8, 2008, 9:27:53 AM1/8/08
to

Maybe, using an extension (but I don't know if such an extension has been
written yet), or userChrome.css (but I don't know exactly how).

I use userChrome.css to underline the current folder, as follows:


/* the following @namespace line is necessary: don't remove */
@namespace
url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

/*****************************************************************
* MISCELLANEOUS *
*****************************************************************/
/*
* highlight the current folder name
*/
treechildren::-moz-tree-cell-text(folderNameCol,selected)
{ text-decoration: underline !important
}

(the @namespace line is one long line, in case your mailer or mine decided to
"beautify" it.)

Maybe you (or someone), with the help of this and/or the DOM Inspector
extension, can tell you how to give the folders fancy colors.

If the name userChrome.css doesn't ring a bell with you, it is a CSS style
sheet which doesn't exist by default, in the chrome/ subfolder of your profile
folder. See:
http://kb.mozillazine.org/UserChrome.css
http://kb.mozillazine.org/Profile_folder_-_Thunderbird


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
221. Your wife melts your keyboard in the oven.

Herb

unread,
Jan 8, 2008, 10:44:36 AM1/8/08
to

Hi Rich

Yes, there is - it was discussed a long time ago (probably on the old
server), and I had coloured folders implemented for a while.

I can't remember the reason why I gave it up, but I can try and dig out
the details if you are interested.

--
Herbert Eppel
www.HETranslation.co.uk

ovidiu

unread,
Jan 8, 2008, 12:26:02 PM1/8/08
to
see
http://kb.mozillazine.org/UserChrome.js/Mail#Folder_icons_.282.29
(and generally http://kb.mozillazine.org/UserChrome.js/Mail)
or the mail tweak extension here that does the script for u
http://journal.mozdev.org/mailtweak.html
with various options, the one for this case being called 'folder icons'

for both ways, you'll have to specify colors (or others) in a userChrome.css

(Alternate for play with styles in css may be stylish extension here
https://addons.mozilla.org/en-US/thunderbird/addon/2108
witch does much like userchrome css but with more or less live preview.
not sure it will work here, with js..)

Ron K.

unread,
Jan 8, 2008, 2:34:43 PM1/8/08
to
ovidiu keyboarded, On 1/8/2008 12:26 PM :


The userChrome.js is obsolete and unneeded when using the Mail Tweak
extension.
The extension actually has the userChrome.js code base integrated which
is what powers all the features of the extension. The web site provides
some details for additions to your userChrome.css that include use of
custome icons per folder based on the folders account name. This is
something I did just because the extension made it possable.

--
Ron K.
Who is General Failure, and why is he searching my HDD?
Kernel Restore reported BSOD use by Major Error to msg the enemy!

Rich Pasco

unread,
Jan 8, 2008, 6:02:20 PM1/8/08
to
Herb wrote:

Thanks, Herb. Of course I'm interested, if it works, but not if you
gave it up because it turned out to be impossible. :-)

- Rich

Rich Pasco

unread,
Jan 8, 2008, 6:16:11 PM1/8/08
to

Wow, thanks, Ron and ovidiu, it looks like either Stylish or Mail Tweak
may do what I want. I'll post back after I've tried one or both.

- Rich

Herb

unread,
Jan 8, 2008, 7:38:34 PM1/8/08
to

Hi Rich

It definitely worked, but one of the methods described in the links
posted in response to your query may be more up-to-date.

Let us now how you get on and/or if you still want me to dig out my
previous details.

--
Herbert Eppel
www.HETranslation.co.uk

Rich Pasco

unread,
Jan 8, 2008, 8:05:59 PM1/8/08
to
Success! Thanks to all who responded.

I successfully installed Mail Tweak according to
http://journal.mozdev.org/mailtweak.html
and observed that its other features work as advertised.

Next I created my chrome/userChrome.css file according to
http://kb.mozillazine.org/UserChrome.css

I inserted into that file CSS rules following the instructions under
"Folder icons" on the MailTweak page.

Next I invoked Tools / Add-ons / Mail Tweak / Options and checked
Folder Icons.

When I re-started Thunderbird, my folders were colored as desired.

To highlight folder names, instead of color them, I changed
{color: red !important;}
to
{background-color: yellow;}

(The "!important" tag didn't seem to be necessary.)

- Rich


Rich Pasco

unread,
Jan 8, 2008, 8:58:23 PM1/8/08
to
Just "thinking out loud" here... instead of highlighting certain folders
by name, I might like to highlight all those folders to which I have
assigned "Favorite Folder" status in Thunderbird. There's probably
a CSS selector for that, instead of the "name-", but it will take some
research to find it. Any ideas?

- Rich

Ron K.

unread,
Jan 8, 2008, 9:08:21 PM1/8/08
to
Rich Pasco keyboarded, On 1/8/2008 8:05 PM :


The !important style value is very useful. When an element is stylyed
the is a sequence of priority. A style statement in the head of a
document will be superseded by an inline style statement inserted into a
single HTML tag. A style statement with the !important value trumps all
previous declarations.

Since several themes use the !important to over ride the styling of the
default theme, You may find that with a theme change your color scheme
will change unexpectedly. If that happens, You will need to add back in
the !important after your color declarations.

ovidiu

unread,
Jan 9, 2008, 2:13:46 PM1/9/08
to
till then, maybe
http://legege.com/en/mozilla/afview
you know, for the variation..cause if js and css make you suddenly see
all in beautiful colors, some may say they are like grass... And you may
wanna show that you can stop (playing with css) or are prepared for new..
Ok, stop. Excuse. I'll be back if with answers.

PC Pete

unread,
Jan 14, 2008, 8:49:24 PM1/14/08
to
Guys, THANK YOU - YOU SAVED MY SANITY!

I've been trawling the chrome.css links for weeks now and getting
frustrated with their "examples"... I've not seen any requests for how
to change a single global font size (which is the only "example" that's
given), but I have seen may requests for individual folder names,
colours, icons, column defaults, anything except the font size.

And the descriptions in the Chrome Element names is quite good for a
starting point, but I stopped manually editing css files a decade ago. I
didn't want to have to get into it all again - especially as many of the
default "stylesheet managers" present you with an intimidating blank
notepad page (which bites butt on two counts - no default "skeleton" and
using notepad as a hard-wired editing tool).

So between ovidiu's links and Rich's great explanations, I now have a
non-Battleship Beige mail client.

Lordy, lordy, lordy, how my eyes have stopped watering...

Cheers,
PC (Pathetic Colours) Pete

PC Pete

unread,
Jan 14, 2008, 9:35:36 PM1/14/08
to
PC Pete wrote:
> blah blah blah
Hmm. Spoke too soon.

I can't seem to find a way to do something to a folder and all it's
child folders - and ONLY its child folders.

What I'm trying to do is colour a folder and whatever folders are in it
with the same background colour. But I can't seem to find a way to do
that without either:
1) specifying all the folders under it individually, or
2) colouring the whole folder tree from top to bottom.

#1 is unacceptable, because a) some of my folders have hundreds of
children, and b) editing/renaming/moving such a folder or child
invalidates the chrome css.

I've tried using treechildren::-moz-tree-cell, but I can't figure out
how to specify the entire folder subtree.

Another strange thing I've noticed is that only the FIRST such element
assignment or specification is ever acted on - subsequent element
specifications don't seem to apply.

By way of example, for two folders at the same "level" in the folder
tree, if I specify:
treechildren::-moz-tree-cell(folderNameCol, name-Audiography Business)
{
background-color: palegreen !important;
}

treechildren::-moz-tree-cell(folderNameCol, name-Personal)
{
background-color: paleblue !important;
}

then only the first folder is coloured. Reversing the directives results
in the folder "further down"the tree (Personal) is coloured, but not the
first.

Maybe this is alimitation of Thunderbird X64?

I can colour the first such element, then colour the text of the second
element, but I can't seem to colour more than one element type at a time.

Any pointers or tips would be welcome. I've reviewed the CSS
documentation, but the examples either only apply to Firefox elements,
or the most simplistic TB elements (global font size/colour) are
documented - and none of the TB chrome element names seem to be findable
- if anyone can provide such a link, I'd very much appreciate it!

TIA,
PCPete

PC Pete

unread,
Jan 15, 2008, 2:30:59 AM1/15/08
to
Hmmm. I can't even get the "zebra stripe" or other examples to work.

I note that leaving the CSS addin dialog open stops any changes saved to
the userchrome.css from being read properly when TB is
shutdown/restarted, all windows and dialogs must be closed. That's a
different issue though (I think).

Any ideas? Suggestions?

FWIW, I'm happy to put up a real-world css file if I can get something
working - browsing DOMs and shift-clicking various entities doesn't
strike me as either useful nor friendly. Maybe this will be addressed in
future versions, but as of now, it's one of the most arcane and
frustrating windows clients I've ever used.

ovidiu

unread,
Jan 15, 2008, 4:57:37 AM1/15/08
to
to answer all the posts of yours (from end to start..)
first, check how these works:
-userChrome works with restarting TB, as this is loaded when opening and
not read live along with TB working.
-for the stylish extension it is supposed to work live (hit preview),
but actually is not always, so restarts may be necessary (btw, there is
a restart extension to add that restart to file menu..)
-userChrome and stylish extension are somewhat doing the same and may
result in fighting each other if covering same issue, so the normal
behavior I think is to test in stylish and when over, to get all in the
userChrome, so that is there for good. In this spirit, if wanna change
something, may temporarily 'deactivate' userCh by renaming it (.old or
css1 etc) and restart. I think may be more efficient to finally use the
userCh instead of the extension, in terms of resources, though is just
an intuitive, not confirmed idea of mine.

ok
as for the folders and colors, I don't know of any selector to get it in
groups for a part of the tree etc. But that was for a .js (or through
extension, the same) to establish as elements and not directly on the
css, so may be necessary to have other js lines to further select those
(and only then to paint with css).

the general css files and things may be found in any theme, some even
modifying the dimensions and behavior of some things (see those
imitating vista for example) or are in the default theme like this
(assuming windows):
-program files/mozilla thunderbird/chrome/ -files with .jar extension
witch are actually zips
get the classic.jar or the messenger.jar, copy somewhere and extract it
there with rar zip app and explore. others jar also. I know those lines
mostly from exploring those as I don't know of a complete doc on the css.

be ware of the elements from extensions, as they are described in
separate chrome's in the folders of those extensions. for example, a big
one would be lightning, with lots of elements to describe the calendar
(a whole new set of ui..). Those are found in the profile folder, under
extensions folder in their respective folder, under the same kind of
jar. (If have problem identifying extension folders with
"dh654n'ed264sw" names get
https://addons.mozilla.org/en-US/thunderbird/addon/2195 to see in the
addons menu the folders..)

As about frustration, get over it (or get frustrated that you cannot get
over the frustration..). Is just not that documented, that's all, and
requires this kind of exploring. If I find a more describing thing for
the css I'll get back, till then only can answer specifically.

0 new messages