Not Logged In

inlinestyler 0.1.7

inlinestyler is an easy way to locally inline CSS into an HTML email message.

Styling HTML email is a black art. CSS works, but only when it’s been placed
inline on the individual elements (and event then, not always) - which makes
development frustrating, and iteration slow.

The general solution is to use an inlining service, which takes a message with
the CSS placed externally, and rewrites it so that all CSS is applied to the
individual elements. The most widely used of these services - and as far as I
can tell, the one that powers CampaignMonitor - is Premailer. It’s a great
service, and the guys behind it put a lot of work into keeping it up to date
with the most recent discoveries in what works and what doesn’t.

inlinestyler takes (most) of the functionality of Premailer, and makes it
available locally, accessible without having call a remote service.

History

Dave Cranwell wrote the original inline-styler single-app Django project,
and (graciously) released it. inlinestyler is a refactor of that project into
a free-standing package usable outside of Django.

Requirements

inlinestyler requires the following packages in order to run:

cssutils (which will be installed by pip)

lxml (which we assume you already have installed through your OS)

It also requires a css_complaiance.csv file, which indicates the
compatibility of various email clients with certain CSS features. This
is included with the package, but can be updated manually from
Campaign Monitor’s spreadsheet.