![Thunderbird logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2024-02-12-07-36-53-599028_1.png)
Thunderbird 102+ Setting backgrounds & colors in the Thread (Message) List based on Message Tags with non-alphanumeric characters
'I'm trying to make it so people can more easily find this information. Because it took me WEEKS to find it...
The way to select for MESSAGE TAGS in your userChrome.css seems to have changed.
You used to be able to use "lc-rrggbb" where "rrggbb" is the hex code for the tag's color. That doesn't seem to work anymore. But you *can* still select based on the LOWER-CASE of the TAG NAME. However, there is a problem when that Tag Name contains non-alphanumeric characters. What if the tag text contains a space or an @ character, for example?
For non-alphanumeric characters, you use "_xx" where "xx" is the Two-Digit Hexadecimal value for the ASCII Code for the character.
There seems to be a special case for the SPACE character: It gets changed to an underscore in the Tag Name, so you must use "_xx" where "xx" is the ASCII Code for the UNDERSCORE, e.g. "_5f"
EXAMPLES:"
- my tag -> my_5ftag
- important! -> important_21
- @@@SPOOF### -> T_40_40_40spoof_23_23_23
I have a tag I that originally created with the tag TEXT "@@@SPOOF###", and now I know that I must use "T_40_40_40spoof_23_23_23" to select for it in userChrome.css
I need to keep in mind that if I change the Tag TEXT from "@@@SPOOF###" to something else, say "WARNING", the Tag NAME does not change. I must STILL use "T_40_40_40spoof_23_23_23". Always open "Settings -> Config Editor..." and search for "mailnews.tags" for see the actual Tag Names.
In my case, I have:
- mailnews.tags.@@@spoof###.color = #e815ff
- mailnews.tags.@@@spoof###.tag = WARNING
In my userChrome.css, for a message with tag "WARNING", I want to set the text color to something that contrasts well with the Selected+Focus background color, and also to set the background color and a good contrasting text color of the Tags Column:
- threadTree > treechildren::-moz-tree-cell-text(T_40_40_40spoof_23_23_23, selected, focus) {
color: #EE59FF !important;
}
- threadTree > treechildren::-moz-tree-cell(T_40_40_40spoof_23_23_23, tagsCol) {
background-color: #751780 !important;
}
- threadTree > treechildren::-moz-tree-cell-text(T_40_40_40spoof_23_23_23, tagsCol) {
color: #D0D0D0 !important;
}
All Replies (1)
I didn't know that the # (HASH) character was going to become a numbered list in my userChrome.css. The "1. " at the beginning of the lines should instead be the HASH character: #
Also, the examples should be:
- my tag -> Tmy_5ftag
- important! -> Timportant_21
- @@@SPOOF### -> T_40_40_40spoof_23_23_23
I left the initial "T" out of the first two
4WoofGrrrr மூலமாக