The infamous Mozilla core editor

Joshua Cranmer 🐧 pidgeot18 at gmail.com
Mon Mar 9 16:48:27 UTC 2015


On 3/9/2015 7:47 AM, Aceman wrote:
> Isn't this what "scoped" <style> is for? http://www.w3schools.com/tags/att_style_scoped.asp
> Despite of what the page indicates, I have also seen IE support <style> placed inside <body>, even without the "scoped" attribute.

Email clients would typically fair much, much worse on email layout than 
standard layout engines. Thunderbird and SeaMonkey use an off-the-shelf 
Gecko rendering engine and can support everything Gecko does, but this 
is the exception not the norm. Outlook's support is based on a really 
old engine (which means you're likely to run into such infamous bugs as 
the hasLayout bug). Apple's .Mail program is likely to use a Webkit 
engine without any HTML rewriting beforehand, but I don't know for 
certain (especially since I have no idea what sandboxing you can do in 
Webkit). Of course, when you talk about web clients or mobile email 
clients, you are almost always going to be seeing clients that require 
manual, whitelist-based sanitization of email as a preprocessing step 
for display.

The end result is that HTML and CSS support in particular lag far, far 
behind in email clients. Don't even think about sending something like 
Acid2 in an email message (although CSS2 support may be functionally 
complete in non-Outlook, non-Gmail clients).

To use the example of <style scoped>, you are probably going to see most 
clients either ignore it or treat it as a <style> block (i.e., whitelist 
sanitization erasing the scoped attribute)--which means its styles will 
apply globally, completely not what you want.

-- 
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist




More information about the tb-planning mailing list