postcss-purifycss
Clean unnecessary CSS with PurifyCSS
Features
- Easily integrates PurifyCSS with postcss
- Allows you to use any PurifyCSS options
- Ignore a line or whole chunks of code, exactly like with
uncss
– taken from UnCSS example/* purifycss:ignore *//* purifycss:ignore start *//* all rules in here will be ignored *//* purifycss:ignore end */
Usage
An example of how to use this module:
const purify = ; ;
Options
Option | Required | Description |
---|---|---|
content |
✓ | The PurifyCSS content argument |
whitelist |
A whitelist using Regular Expressions | |
purifyOptions |
The optional PurifyCSS options argument |
Credits
Credits to UnCSS (MIT) for the ignoring code and the foundation of a PostCSS plugin.