[dev] Full HTML/CSS support on message view

Michael M Slusarz slusarz at horde.org
Thu Sep 10 20:20:51 UTC 2009


Quoting Rui Carneiro <rui.carneiro at portugalmail.net>:

> Hi there.
>
> The idea of this thread is sharing some ideas on how to add full support of
> HTML/CSS on IMP so it can have a good result on "email acid test" (
> http://www.email-standards.org/)
>
>> From what I saw on other webmails with good results (e.g AOL and Yahoo!)
> there is 1 common solution:

I've been playing around with this in the last two weeks or so, and  
there are some issues that need to be resolved.  See below.

> First step is to embed the message on an iframe before showing the message.
> This will "reset" all previous CSS conditions so we might need to set a few
> like font family, size or color.

Agreed.  We can simply create a stripped down-stylesheet for this  
purpose (so that it is cached by the server).  For dimp, it will be  
easiest to create a hidden iframe on load, and then clone this iframe  
as needed to view the HTML code.

> Second step is to make a parser that can change message's CSS (ids and
> classes) from this
>
> #test {
>  color: red;
> }
>
> to something like this
>
> #horde_unique_id #test {
>  color: red;
> }
>
> This "#horde_unique_id" should be the id of the element (e.g. div) where the
> email message will be shown. This way only the elements inside
> "horde_unique_id" will be affected by message's CSS.

I don't understand why we need this.  If the message part contains CSS  
definitions, it will only be applied within the iframe.  And none of  
the base Horde CSS will be applied within the iframe.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list