boost

inline css into your html

boost

Given HTML, boost will inline your CSS properties into the style attribute.

boost builds on juice, making your email templating task Even More Convenient.

var boost = require('boost');
boost("/path/to/file.html", function(errhtml) {
  console.log(html);
});

/path/to/file.html:

<html>
<head>
  <style>
    p { color: red; }
  </style> 
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <p>Test</p>
</body>
</html>

style.css

p {
  text-decoration: underline;
}

Output:

<p style="color: red; text-decoration: underline;">Test</p>
  • HTML emails. See juice
  • Embedding HTML in 3rd-party websites.

Because then you cannot take advantage of template inheritance with your css.