Uncss is a build pipeline CSS optimizer and optimization tool designed to remove unused styles from stylesheets. It analyzes HTML files to identify and strip selectors that do not match any elements in the markup, reducing the final stylesheet size and overall web page weight. The tool functions as a DOM-based CSS analyzer that can simulate runtime document states. It provides mechanisms to preserve required selectors through the use of literal names, regular expressions, and specialized CSS comment markers to ensure styles triggered by user interactions are not deleted. The project supports
PurifyCSS is a CSS unused style remover and payload optimizer that analyzes HTML and templates to identify and delete unused CSS selectors from stylesheets. It functions as a frontend build automation tool that integrates into development pipelines to automatically strip redundant styles and minify assets during the compilation phase. The tool provides specific optimization for single page applications, identifying and removing redundant CSS while ensuring necessary styles are preserved across dynamic views and states. The utility covers a range of capabilities including static content analy
Windi CSS is a utility-first CSS framework that generates only the CSS classes actually used in a project, scanning source files at build time to produce smaller, optimized stylesheets. It provides on-demand style generation through static analysis of HTML and template files, eliminating unused styles for leaner output. The framework offers a plugin-based extension system for adding custom utilities, variants, and design tokens without modifying the core. It includes built-in compatibility for migrating from Tailwind CSS, removing Tailwind-specific dependencies and configuration fields while
cssnano is a CSS compression tool and minifier that reduces the file size and gzip footprint of stylesheets. It operates as a build pipeline optimizer and code transformer that removes whitespace and comments while shortening colors and gradients into their smallest possible representations. The tool uses a modular plugin architecture and preset-based optimization levels to balance compression intensity with browser compatibility. It allows for the adjustment of output based on a target list of supported browsers to ensure minified styles remain compatible across different environments. The
PurgeCSS is a build-pipeline CSS purger and optimizer designed to reduce the final size of stylesheets. It functions as a tree shaking tool that scans HTML and JavaScript files to identify and remove unused selectors from CSS.
The main features of fullhuman/purgecss are: CSS Selector Purging, Content Pattern Matching, CSS AST Transformations, Markup Usage Analysis, CSS Payload Reduction, CSS Unused Style Removers, CSS Build Tools, Frontend Build Toolchains.
Open-source alternatives to fullhuman/purgecss include: uncss/uncss — Uncss is a build pipeline CSS optimizer and optimization tool designed to remove unused styles from stylesheets. It… purifycss/purifycss — PurifyCSS is a CSS unused style remover and payload optimizer that analyzes HTML and templates to identify and delete… windicss/windicss — Windi CSS is a utility-first CSS framework that generates only the CSS classes actually used in a project, scanning… cssnano/cssnano — cssnano is a CSS compression tool and minifier that reduces the file size and gzip footprint of stylesheets. It… facebook/stylex — StyleX is a type-safe CSS-in-JS library and atomic CSS compiler that transforms JavaScript style definitions into… addyosmani/critical — Critical is a tool for extracting and inlining the minimum CSS required to render above-the-fold content. It…