Shadowroot plugin to avoid CSS from HTML mails styling your UI

Alexey Shpakovsky via squirrelmail-plugins <[email protected]> Thu, 16 Jul 2020 18:58:53 +0200
Newsgroups gmane.mail.squirrelmail.plugins
Message-ID <[email protected]>
Hi all,

Under SquirrelMail 1.4.22, CSS styles in HTML mail might affect whole
message window, usually making it look horrible:

http://alexey.shpakovsky.ru/unlisted/shadowroot-before.png

Provided plugin uses "shadowroot" feature of modern browsers, which with
help of 6 lines of javascript confines CSS styles to content of message
itself, making message look much better:

http://alexey.shpakovsky.ru/unlisted/shadowroot-after.png

Note that it requires enabled javascript and a fairly recent browser.
Achieving similar effect without javascript would be possible by loading
contents of mail message within iframe, but that would be much bigger
change :)

Plugin is for SquirrelMail 1.4 only. Download link:

http://alexey.shpakovsky.ru/unlisted/shadowroot.tar.gz

Please let me know what you think.

Alexey.



-----
squirrelmail-plugins mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.plugins
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-plugins