Skip to main content

An Email CSS Inliner to inline a external CSS to HTML

Project description

X-Net Email CSS Inliner

The X-Net Email CSS Inliner is a HTML email inliner inspired by the ZURB CSS inliner.

Inlining is the process of prepping an HTML email for delivery to email clients Some email clients strip out your email's styles unless they are written inline with style tags. Here's what the inliner does:

  • Inlining CSS: All of your CSS is embedded directly into the HTML as style attributes on each tag.
  • CSS inside a @media block can't be inlined, so it's put in a <style> tag.

You can use our great X-Net Django Email Template with the X-Net Email CSS Inliner

Installation

pip install x_net_email_css_inliner

Example

from x_net_email_css_inliner import EmailCSSInliner

raw_html = "<html>...</html>"  # HTML email template
html_with_inline_css = str(EmailCSSInliner(raw_html))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

x-net-email-css-inliner-1.0.2.tar.gz (35.4 kB view hashes)

Uploaded Source

Built Distribution

x_net_email_css_inliner-1.0.2-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page