W3C home > Mailing lists > Public > public-htmail@w3.org > February 2014

Re: Include CSS in emails

From: Charles McCathie Nevile <chaals@yandex-team.ru>
Date: Thu, 06 Feb 2014 11:43:43 +0400
Cc: "HTML for Email Community Group" <public-htmail@w3.org>
To: "Neil Jenkins" <neilj@fastmail.fm>
Message-ID: <op.xaunq5w2y3oazb@5.255.232.42-red.dhcp.yndx.net>
On Wed, 05 Feb 2014 12:05:14 +0400, Karim El Khalifa
<Karim.ElKhalifa@unil.ch> wrote:

> Why not use the existing attachment process ?

There seems to be no advantage over having the style sheet directly in the
head - you end up having to provide more content and a link for the same
result.

> For example in the mail body:
>
>   <link rel="stylesheet" type="text/css"  
> href="cid:part1.03090201.07070703" />

On the other hand, the combination of discussions about sanitising CSS,
and signing Javascript for inclusion, makes me wonder if there is any
value in having links to known (signed), sanitised CSS.

cheers

> Le 05.02.2014 08:51, Stefan Mies a écrit :
>>
>> Hi Neil,
>>
>> I agree, there will be a lot of obvious benefits, but in the other
>> hand it could become a lot of new issues. So what the point, if all
>> CSS source including in the file, the file size will be much bigger,
>> but I think if would be possible to use containers to design the
>> content the source will be a little bit smarter.
>>
>> So at least we take a pass on <link rel="stylesheet" type="text/css"
>> href="*.css">.
>>
>> Right?
>>
>> Am 05.02.2014 02:26 schrieb "Neil Jenkins" <neilj@fastmail.fm
>> <mailto:neilj@fastmail.fm>>:
>>
>>     On Tue, 4 Feb 2014, at 11:05 PM, Stefan Mies wrote:
>>     > Because an external style sheet is ideal when the style is
>>     applied to
>>     > many pages, not for only one page like an email.
>>
>>     The main trouble with external stylesheets is the need to sanitise  
>> the
>>     CSS (at least in the webmail context) to prevent conflicts with UI
>>     styles, or security issues (remember you could put JavaScript in
>>     CSS in
>>     older versions of IE, *sigh*). It's possible to support, if the  
>> server
>>     downloads it, cleans it, and then passes it on to the client, but  
>> you
>>     have the same trouble as images (can be used for tracking) and it
>>     would
>>     have to happen out-of-band with the fetch of the rest of the email
>>     content, which makes all sorts of UI rendering issues harder. For
>>     these
>>     reasons, we don't currently support external stylesheets at  
>> FastMail,
>>     and I imagine most webmail vendors would join me in saying we'd  
>> rather
>>     they were avoided.
>>
>>     Neil.
>>
>


-- 
Charles McCathie Nevile - Consultant (web standards) CTO Office, Yandex
         chaals@yandex-team.ru         Find more at http://yandex.com
Received on Thursday, 6 February 2014 07:44:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:54:17 UTC