css-inline
A crate for inlining CSS into HTML documents. When you send HTML emails you need to use "style" attributes instead of "style" tags.
For example, this HTML:
Test
Big Text
Solid
Foot notes
Will be turned into this:
Test
Big Text
Solid
Foot notes
To use it in your project add the following line to your dependencies
section in project's Cargo.toml
file:
= "0.1"
Example:
use css_inline;
const HTML: &str = r#"<html>
<head>
<title>Test</title>
<style>
h1, h2 { color:blue; }
strong { text-decoration:none }
p { font-size:2px }
p.footer { font-size: 1px}
</style>
</head>
<body>
<h1>Big Text</h1>
<p>
<strong>Solid</strong>
</p>
<p class="footer">Foot notes</p>
</body>
</html>"#;