4 Repos
Mechanisms for removing CSS rules whose selectors do not match any elements in the target content.
Distinct from CSS Selectors: Distinct from CSS Selectors: focuses on the removal of unused rules rather than the definition of style targeting.
Explore 4 awesome GitHub repositories matching web development · CSS Selector Purging. Refine with filters or upvote what's useful.
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
A tool that analyzes HTML and templates to identify and delete unused CSS selectors from stylesheets.
PurgeCSS ist ein CSS-Purger und -Optimierer für Build-Pipelines, der darauf ausgelegt ist, die endgültige Größe von Stylesheets zu reduzieren. Es fungiert als Tree-Shaking-Tool, das HTML- und JavaScript-Dateien scannt, um ungenutzte Selektoren aus dem CSS zu identifizieren und zu entfernen. Das Tool optimiert CSS-Payloads durch statische Inhaltsanalyse, um zu erkennen, welche Styles tatsächlich im Markup verwendet werden. Es nutzt Regex-basiertes Pattern-Matching, um potenzielle Klassennamen zu finden, ohne Code auszuführen, und verwendet eine PostCSS-basierte AST-Transformation, um ungenutzte Regeln sicher zu löschen. Das Projekt bietet Funktionen für die Frontend-Build-Automatisierung, wodurch das Entfernen ungenutzter Styles direkt in Modul-Bundler und Task-Runner integriert werden kann. Es enthält zudem einen benutzerdefinierten Whitelist-Filter, um essenzielle Selektoren unabhängig vom Scan-Ergebnis zu bewahren.
Removes CSS rules whose selectors do not match any elements found during the static content scan.
grunt-uncss is a CSS dead code eliminator and static analysis build tool. It functions as a Grunt CSS optimization plugin that identifies and deletes redundant style rules to reduce stylesheet file sizes and improve frontend performance. The tool analyzes HTML files and headless browser DOM states to detect styles that do not match any elements in the markup. It supports the protection of specific selectors through whitelists to ensure that styles for dynamically injected elements are preserved during the cleanup process. The project covers frontend asset minification by compressing cleaned
Protects designated CSS selectors from being purged to ensure styles remain for runtime elements.
Helium-css is a command-line diagnostic utility designed to identify unused CSS selectors across web projects. By performing static analysis on style sheets and comparing them against the rendered document object model, the tool detects redundant style definitions that do not correspond to any elements on a page. The tool functions by automating a headless browser to crawl multiple URLs, aggregating selector usage data to provide a comprehensive view of CSS coverage for an entire website. This process allows developers to audit frontend assets and remove legacy code, which reduces the total s
Identifies and reports CSS selectors that do not match any elements within the document object model to reduce unnecessary file size.