Re: Include CSS in emails

Why not use the existing attachment process ?

For example in the mail body:

  <link rel="stylesheet" type="text/css" href="cid:part1.03090201.07070703" />

and the css in attachement:

Content-Type: text/css;
  name="style.css"
Content-Transfer-Encoding: base64
Content-ID: <part1.03090201.07070703>
Content-Disposition: inline;
  filename="style.css"


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.
>

-- 
Signature
Karim El Khalifa


Centre informatique - Analyste Programmeur
Université de Lausanne
Quartier UNIL-Sorge - Bâtiment Amphimax
1015 Lausanne
tel: +41 21 692 22 13
email: Karim.ElKhalifa@unil.ch

Received on Wednesday, 5 February 2014 08:05:45 UTC