Register "messageBody.css" as UA sheet

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Register "messageBody.css" as UA sheet

Mozilla - Thunderbird mailing list
[Cross-posted to m.d.a.thunderbird and m.d.a.seamonkey]

[Disclaimer: I'm a SeaMonkey user but I believe the related
implementation is shared with Thunderbird.]

I've ever wondered if there's a specific reason to have
"messageBody.css" [1] linked as an _author_ sheet rather than an _agent_
sheet (see [2]) in messages, or it is just a historical state?

I'm asking as I've always struggled customizing the default message
appearance (mostly quotes: colors, etc.) via _user_ styles having to
employ !important declarations which in turn force me to use yet more
!important declarations in order to undo the effect of my initial
declaration to agent/author rules I'm not aware at the time.  In this
regard shouldn't nsIDOMWindowUtils.loadSheet() [3] (or similar) with
'type' argument of AGENT_SHEET be better used to include the mail
specific styles for messages?

One may argue there are styles which should not be allowed to be
overridden by author styles (in HTML messages) like:

     .mimeAttachmentHeaderXxx {

but this is possible currently already.  If there are such styles their
declarations should be made !important, and having them in an UA sheet
would ensure they take effect with the greatest specificity.

Having said all that, is it worth opening a bug requesting the relevant
change?  That is, do most devs here agree the current implementation
could be changed as suggested?

[1] chrome://messagebody/skin/messageBody.css

dev-apps-thunderbird mailing list
[hidden email]