Miss any of our Open RFC calls?Watch the recordings here! »

email-comb

3.10.7 • Public • Published

email-comb

Remove unused CSS from email templates

Install

npm i email-comb

Quick Take

import { strict as assert } from "assert";
import { comb, defaults, version } from "email-comb";
 
// aptly named classes:
const source = `<head>
<style type="text/css">
.unused1[z] {a:1;}
.used[z] {a:2;}
</style>
</head>
<body class="  used  "><a class="used unused3">z</a>
</body>
`;
 
const intended = `<head>
<style type="text/css">
.used[z] {a:2;}
</style>
</head>
<body class="used"><a class="used">z</a>
</body>
`;
 
assert.equal(comb(source).result, intended);

Documentation

Please visit codsen.com for a full description of the API and examples.

Licence

MIT License

Copyright (c) 2010-2020 Roy Revelt and other contributors

ok codsen star

Install

npm i email-comb

DownloadsWeekly Downloads

7,316

Version

3.10.7

License

MIT

Unpacked Size

517 kB

Total Files

10

Last publish

Collaborators

  • avatar