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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file x-net-email-css-inliner-1.0.2.tar.gz
.
File metadata
- Download URL: x-net-email-css-inliner-1.0.2.tar.gz
- Upload date:
- Size: 35.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c40bb4949f49f01f676b403437634b2c4826383b936c5cb8468f578329483ca |
|
MD5 | 650aab11b21b3a6447e2fe3286770a56 |
|
BLAKE2b-256 | c33f1be63507474cc033a61467efd57f9bbf583286aacd56bec6ca17e11d27b4 |
File details
Details for the file x_net_email_css_inliner-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: x_net_email_css_inliner-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd5ab4635f37d17e155ab02d60c624d3ae1be4dbe8eccc70ac4840469a8a92dd |
|
MD5 | 07d3cacf0ac889ee00c9c6345e3ef8a5 |
|
BLAKE2b-256 | 9a2f78f89e5ea019c97af4b63ca87d70cd078cfab452f62347ce703880a3b8fe |