4 مستودعات
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 هو أداة لتنقية وتحسين ملفات CSS ضمن خط أنابيب البناء (build-pipeline)، مصممة لتقليل الحجم النهائي لملفات التنسيق. يعمل كأداة "هز شجري" (tree shaking) تقوم بمسح ملفات HTML وJavaScript لتحديد وإزالة المحددات (selectors) غير المستخدمة من ملفات CSS. تعمل الأداة على تحسين حمولات CSS من خلال إجراء تحليل ثابت للمحتوى لاكتشاف الأنماط المستخدمة فعلياً في الترميز. تستخدم مطابقة الأنماط القائمة على التعبيرات النمطية (regex) للعثور على أسماء الفئات المحتملة دون تنفيذ الكود، وتوظف تحويل AST القائم على PostCSS لحذف القواعد غير المستخدمة بأمان. يوفر المشروع قدرات لأتمتة بناء الواجهة الأمامية، مما يسمح بدمج إزالة الأنماط غير المستخدمة مباشرة في مجمعات الوحدات (module bundlers) ومشغلات المهام. كما يتضمن مرشح قائمة بيضاء (whitelist) مخصص للحفاظ على المحددات الأساسية بغض النظر عما إذا تم اكتشافها أثناء مسح المحتوى.
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.