Aris-t2 / CustomizeMyBird

Customize Thunderbird 52-60.x (no support for Thunderbird 68+)
16 stars 5 forks source link

Can this add-on change the background color of the content of the mail? #10

Closed qqlovekerry closed 5 years ago

qqlovekerry commented 5 years ago

Hi, First all, thanks very much for this excellent add-on for Thunderbird! If possible, could you please tell me whether this add-on has a feature like this? Or maybe it will be added in the future? I want to change the background color fo the region containing the main content of the mail. If it is changeable, maybe some eye-protect color can be used. My screenshot may help to illustrate my need. Please find it in the attachment. Any help would be much appreciated! thunderbird

Aris-t2 commented 5 years ago

There is no own option in CMB to change those colors, but you can use this example CSS style on CMBs preference area inside "Custom CSS" textbox to apply own colors:

/* mail content */
html body:not([data-app="thunderbird"]) {
  background: black !important;
  color: white !important;
}

/* mail list background */
#threadContentArea #threadTree treechildren {
  background: black !important;
}

/* mail list active items background */
#threadContentArea #threadTree treechildren::-moz-tree-row(selected),
#threadContentArea #threadTree treechildren::-moz-tree-row(current, focus),
#threadContentArea #threadTree treechildren::-moz-tree-row(selected, focus),
#threadContentArea #threadTree treechildren::-moz-tree-row(dropOn),
#threadContentArea #threadTree treechildren::-moz-tree-row(selected, current, focus),
#threadContentArea #threadTree treechildren::-moz-tree-row(hover),
#threadContentArea #threadTree treechildren::-moz-tree-row(hover, current),
#threadContentArea #threadTree treechildren::-moz-tree-row(hover, selected) {
  background: red !important;
}

/* mail list text color */
#threadContentArea #threadTree treechildren::-moz-tree-cell-text {
  color: white !important;
}

/* mail list active items text color */
#threadContentArea #threadTree treechildren::-moz-tree-cell-text(primary, dropOn),
#threadContentArea #threadTree treechildren::-moz-tree-cell-text(selected),
#threadContentArea #threadTree treechildren::-moz-tree-cell-text(current, focus),
#threadContentArea #threadTree treechildren::-moz-tree-cell-text(selected, focus),
#threadContentArea #threadTree treechildren::-moz-tree-cell-text(dropOn),
#threadContentArea #threadTree treechildren::-moz-tree-cell-text(selected, current, focus),
#threadContentArea #threadTree treechildren::-moz-tree-cell-text(hover),
#threadContentArea #threadTree treechildren::-moz-tree-cell-text(hover, current),
#threadContentArea #threadTree treechildren::-moz-tree-cell-text(hover, selected) {
  color: yellow !important;
}
qqlovekerry commented 5 years ago

Thanks very much for your reply! That works. In this case, it seems I should use standard colors defined in Firefox, for example, pink, blue, green, to change the background colors. Is that possible to change a color based on self-defined RGB? And could you please consider to integrate this function into CMB? Maybe something similar to the 'Scrollbars' part.

Thanks in advance!

Aris-t2 commented 5 years ago

You can try other rgb(a)/hsl(a) colors too. I used simple color names for the example only.

I might add this to CMB in the future.

qqlovekerry commented 5 years ago

Thanks very very much! That is very cool!

Aris-t2 commented 5 years ago

Added in CMB 2.7.