awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
uncss avatar

uncss/uncss

0
View on GitHub↗
9,408 stars·405 forks·JavaScript·MIT·15 views

Uncss

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 integration with build systems and task runners to automate the removal of dead CSS during the compilation process. It further enables the execution of custom JavaScript pre-processing scripts to modify the document state before analysis.

Features

  • CSS Unused Style Removers - Provides a system to analyze the DOM and strip unused CSS selectors to reduce stylesheet size.
  • CSS Build Tools - Acts as a build-time engine that scans source files to remove unused CSS styles.
  • CSS Optimization - Provides a utility for purging unused CSS styles to optimize stylesheet size.
  • CSS Payload Reduction - Analyzes HTML markup to delete redundant CSS rules, ensuring only essential styles are delivered.
  • DOM Element Selectors - Matches CSS selectors against a parsed HTML document object model to determine which rules are actually applied.
  • Stylesheet Management - Manages large stylesheets by stripping unnecessary rules while protecting essential selectors.
  • Unused Style Removal - Analyzes HTML files to identify and delete styles from CSS stylesheets that are not used in the markup.
  • Frontend Performance Optimization - Reduces CSS file size to improve page load times and browser rendering.
  • CSS Purging - Identifies and removes unused CSS rules from stylesheets to reduce overall file size.
  • Build System Integrations - Integrates with JavaScript build tools and style processors to remove unused CSS rules.
  • CSS Rule Preservation Markers - Implements specialized CSS comment markers to flag style blocks that must be kept regardless of analysis.
  • Build Pipeline Integrations - Automates the cleanup of unused stylesheets during the compilation process using build tools.
  • Build Pipeline Integrators - Connects task runners and style processors to automatically clean up unused CSS during the build process.
  • DOM State Simulation - Executes custom JavaScript scripts to modify the document state to account for dynamic class additions.
  • Abstract Syntax Tree Parsing - Uses abstract syntax tree parsing to deconstruct stylesheets for rule removal without breaking CSS syntax.
  • Asset Optimization Pipelines - Operates as a middleware step in build tools to strip unused styles after compilation.
  • Interactive Selector Bindings - Preserves specific CSS selectors to ensure styles triggered by user interactions are not deleted.
  • Preservation Lists - Prevents the removal of specific CSS rules using a list of selectors, regular expressions, or comments.
  • Regex-Based Protection - Prevents the deletion of specific styles by matching selector names against user-defined regular expressions.
  • Pre-Load Injections - Executes custom JavaScript before analysis to simulate runtime DOM changes for more accurate results.

Star history

Star history chart for uncss/uncssStar history chart for uncss/uncss

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Uncss

Similar open-source projects, ranked by how many features they share with Uncss.
  • purifycss/purifycsspurifycss avatar

    purifycss/purifycss

    9,863View on GitHub↗

    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

    JavaScript
    View on GitHub↗9,863
  • fullhuman/purgecssFullHuman avatar

    FullHuman/purgecss

    8,043View on GitHub↗

    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 tool optimizes CSS payloads by performing static content analysis to detect which styles are actually used in the markup. It uses regex-based pattern matching to find potential class names without executing code and employs a PostCSS-based AST transformation to safely delete unused rules. The project provides capabilities for frontend build automation, allowing the

    TypeScript
    View on GitHub↗8,043
  • cssnano/cssnanoC

    cssnano/cssnano

    4,974View on GitHub↗

    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

    CSS
    View on GitHub↗4,974
  • windicss/windicsswindicss avatar

    windicss/windicss

    6,515View on GitHub↗

    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

    TypeScriptcsscss-compileron-demand
    View on GitHub↗6,515
See all 30 alternatives to Uncss→

Frequently asked questions

What does uncss/uncss do?

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.

What are the main features of uncss/uncss?

The main features of uncss/uncss are: CSS Unused Style Removers, CSS Build Tools, CSS Optimization, CSS Payload Reduction, DOM Element Selectors, Stylesheet Management, Unused Style Removal, Frontend Performance Optimization.

What are some open-source alternatives to uncss/uncss?

Open-source alternatives to uncss/uncss include: purifycss/purifycss — PurifyCSS is a CSS unused style remover and payload optimizer that analyzes HTML and templates to identify and delete… fullhuman/purgecss — PurgeCSS is a build-pipeline CSS purger and optimizer designed to reduce the final size of stylesheets. It functions… cssnano/cssnano — cssnano is a CSS compression tool and minifier that reduces the file size and gzip footprint of stylesheets. It… windicss/windicss — Windi CSS is a utility-first CSS framework that generates only the CSS classes actually used in a project, scanning… uncss/grunt-uncss — grunt-uncss is a CSS dead code eliminator and static analysis build tool. It functions as a Grunt CSS optimization… webpack/mini-css-extract-plugin — This is a Webpack extension used to extract CSS from JavaScript files into separate, standalone stylesheets for…