Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

email-comb

3.10.5 • 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

6,146

Version

3.10.5

License

MIT

Unpacked Size

517 kB

Total Files

10

Last publish

Collaborators

  • avatar