[Kde-pim] user css controlled mail appereance... reload.

Ingo Klöcker kloecker at kde.org
Fri Nov 14 19:45:14 GMT 2008

On Thursday 13 November 2008, Thomas Lübking wrote:
> now on topic:
> > you would handle mails that does not come with all the header data
> > we [...]
> > template into several files. Or the (one) template file would have
> > some extra structure with markers that you would have to parse...I
> > think this is possible, although not that nice.
> my (html inclusion has yet not been finished, but WE is near...)
> approach is pretty simple:
> ---------------
> dynamic content is inserted via the
> object id and css ":after"
> (i.e. kmail has a little power even after the userstyle is applied)
> att "display:none;" is in case also applied to objects != {subject,
> sender, receiver} where i just add some def. content ("No Subject")
> so a (incomplete) <html> part could look like:
> <h1 id="subject"/>
> <div id="sender"><span id="fromLabel"/></div>
> <div id="CC"><span id="ccLabel"/></div>
> and kmail (after the screen and user css have been applied) does
> some:
> '#subject:after { content:\"message->subject().isEmpty() ?
> i18n("NoSubject") : strToHtml( message->subject() )\"; }'
> ...
> if (message->cc().isEmpty())
>    #cc { display:none; }
> else ...
> @Ingo:
> i intended to extend kmail/headerstyle here. if this should be shared
> between kmail, kontact, akregator: is this still the right place or
> is there another central hook?

Yes, I think so. Eventually headerstyle will be moved to a library that 
can also be used by Akregator.

> > change everything just by css? What about some javascript stuff?
> NO JS IN MY MAILS. (sorry for shouting. the whole custom styling
> thing is mainly to convince ppl. to /not/ use html mails, please...
> Please... PLEASE!!!)

All active content (i.e. scripting, plugins, etc.) is disabled in the 
HTML renderer used for message rendering and this won't change.

> > As one metion in the mailing list before, it would be cool if we
> > could collapse the header to a one-liner like in thunderbird and
> > things like
> kmail could add this as js internally, but wait - i forgot:
> however, there seems  to be an internal protocol (used with the
> quotemarks in objectparser.cpp, kmail:levelquote?x) i assume this
> could easily be extended to (un)collapse the header (to the subject
> or whatever)

Yes, this should be pretty easy.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20081114/a31af026/attachment.sig>
-------------- next part --------------
KDE PIM mailing list kde-pim at kde.org
KDE PIM home page at http://pim.kde.org/

More information about the kde-pim mailing list