Hysen Labs
Open-source project
purifycss/purifycss avatar
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.

9,853 stars380 forksJavaScriptMIT
01
DEEP OPEN-SOURCE ANALYSIS

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.

02
DEEP OPEN-SOURCE ANALYSIS

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.

03
DEEP OPEN-SOURCE ANALYSIS

Potential reduction

The README section "Potential reduction" states: Bootstrap file: ~140k App using ~40% of selectors. Minified: ~117k Purified + Minified: ~35k

04
DEEP OPEN-SOURCE ANALYSIS

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?

05
DEEP OPEN-SOURCE ANALYSIS

Examples

The README section "Examples" states: Example with both glob file patterns and source strings + minify + logging rejected selectors

06
DEEP OPEN-SOURCE ANALYSIS

Editorial conclusion

The repository README is the source for this review. It does not replace a local installation or an independent test.

07
DEEP OPEN-SOURCE ANALYSIS

Official sources

08
Community notes

Community notes