purifycss
GitHub describes it as Remove unused CSS. Also works with single-page apps.. The repository metadata lists JavaScript as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.
purifycss/purifycss: PurifyCSS
GitHub describes it as Remove unused CSS. Also works with single-page apps.. The repository metadata lists JavaScript as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.
Repository scope
GitHub describes it as Remove unused CSS. Also works with single-page apps.. The repository metadata lists JavaScript as its primary language. The metadata lists the MIT license. The README describes the project this way: A function that takes content (HTML/JS/PHP/etc) and CSS, and returns only the used CSS . PurifyCSS does not modify the original CSS files. You can write to a new file, like minification. If your application is using a CSS framework, this is especially useful as many selectors are often unused.
Potential reduction
The README section "Potential reduction" states: Bootstrap file: ~140k App using ~40% of selectors. Minified: ~117k Purified + Minified: ~35k
Used selector detection
The README section "Used selector detection" states: Statically analyzes your code to pick up which selectors are used. But will it catch all of the cases?
Examples
The README section "Examples" states: Example with both glob file patterns and source strings + minify + logging rejected selectors
Editorial conclusion
The repository README is the source for this review. It does not replace a local installation or an independent test.
Community notes