#8 RFE: Add class to display of message body

open
nobody
None
before_1.4
Enhancement
2012-08-22
2012-08-06
No

Bug 7837 migrated from Mozdev.org

It it's not difficult, it might be useful to add a CSS class to the <body>
element indicating the EnigMail status of the message (good signature, untrusted
key, etc). That way, the user could use userContent.css to change how the
message is styled, if so desired. The most obvious example is to make the
background of the message a pale green if the message has a good signature from
a trusted sender, or yellow for a good signature from an untrusted sender, as
I'm told KMail does.

------- Comment #1 From Patrick Brunschwig 2004-11-05 02:12:45 [reply] -------

That's a good idea, I'll look into it.

------- Comment #2 From Fabián Rodríguez 2004-11-09 23:33:19 [reply] -------

I like this idea! I also proposed something similar but for headers in bug

7613.

I don't know is userContent.css can be modified from within Enigmail, but
having
options for this kind of coloring / styling in Enigmail's preferences would
make
it intuitive to use this.

------- Comment #3 From Patrick Brunschwig 2005-03-31 01:19:07 [reply] -------

I tried to implement this, but I couldn't find the XUL element and/or the
attribute to change to actually set the background color. Perry, do you have an
idea which element it could be?

Furthermore, I believe this won't work for HTML messages as the background color
can be set by the sender.

------- Comment #4 From David Perry 2005-03-31 19:40:44 [reply] -------

(In reply to comment #3)

I tried to implement this, but I couldn't find the XUL element and/or the
attribute to change to actually set the background color. Perry, do you have an
idea which element it could be?

Someone created a modified DOM Inspector XPI that would install in Thunderbird,
which I used to find the appropriate element. There is a <browser> element with
id "messagepane", inside a <vbox> id'd "messagepanebox". The child of that is a
normal HTML document; I added style="background-color:red" to its <body> in the
DOMi and it affected my (plain-text) message.

Furthermore, I believe this won't work for HTML messages as the background color
can be set by the sender.

You're probably right about that. But keep in mind that the suggestion is just
to add classes to the email, not to actually change its appearance. You can add
the classes, and then let the user worry about what rules need to be
!important'ed in order to beat Thunderbird into submission. (:

Discussion