A deprecated Gulp plugin that removes unused CSS selectors from stylesheets by analyzing HTML files.
gulp-uncss is a deprecated Gulp plugin that removes unused CSS selectors from stylesheets. It analyzes HTML files, URLs, or inline HTML to identify which CSS rules are actually used, then strips out the rest to reduce file size and improve front-end performance. The plugin integrates into Gulp build pipelines, allowing chaining with other CSS processing steps like Sass compilation and minification.
Frontend developers and build engineers using Gulp for their build processes who need to optimize CSS file sizes by removing unused styles.
It automates the removal of unused CSS directly within Gulp workflows, offering a streamlined way to reduce stylesheet bloat without manual auditing. However, it's now deprecated in favor of using UnCSS as a PostCSS plugin for more flexible CSS processing.
DEPRECATED. Remove unused CSS selectors.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Seamlessly fits into Gulp streams, enabling easy chaining with tasks like Sass compilation and minification, as demonstrated in the README example with gulp-sass and gulp-cssnano.
Accepts local files, glob patterns, URLs, and raw HTML strings for CSS analysis, allowing comprehensive detection of used styles across various inputs.
Supports preserving selectors for interactive states (e.g., hover or click) via literal names or regex patterns, preventing accidental removal of user interaction styles.
The README includes a deprecation notice, recommending migration to postcss-uncss, meaning no updates, bug fixes, or new features will be added.
UnCSS is now a PostCSS plugin, making gulp-uncss an unnecessary middleman; PostCSS integration allows more flexible and efficient CSS processing with plugins like cssnano.
Ties CSS optimization to Gulp, which can be restrictive for teams using other build tools or seeking framework-agnostic solutions.