DropCSS takes your HTML and CSS as input and returns only the used CSS as output. Its custom HTML and CSS parsers are highly optimized for the 99% use case and thus avoid the overhead of handling malformed markup or stylesheets, so well-formed input is required. There is minimal handling for complex escaping rules, so there will always exist cases of valid input that cannot be processed by DropCSS; for these infrequent cases, please start a discussion. While the HTML spec allows html, head, body and tbody to be implied/omitted, DropCSS makes no such assumptions; selectors will only be retained for tags that can be parsed from provided markup. It's also a good idea to run your CSS through a structural optimizer like clean-CSS, csso, cssnano or crass to re-group selectors, merge redundant rules, etc. It probably makes sense to do this after DropCSS, which can leave redundant blocks.

Features

  • An exceptionally fast, thorough and tiny (~10 KB min) unused-CSS cleaner (MIT Licensed)
  • It's also a good idea to run your CSS through a structural optimizer
  • Return false to retain the selector or true to drop it
  • Retention of all transient pseudo-class and pseudo-element selectors which cannot be deterministically checked from the parsed HTML
  • Deep resolution of composite CSS variables
  • Removal of unused CSS variables

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow DropCSS

DropCSS Web Site

Other Useful Business Software
AestheticsPro Medical Spa Software Icon
AestheticsPro Medical Spa Software

Our new software release will dramatically improve your medspa business performance while enhancing the customer experience

AestheticsPro is the most complete Aesthetics Software on the market today. HIPAA Cloud Compliant with electronic charting, integrated POS, targeted marketing and results driven reporting; AestheticsPro delivers the tools you need to manage your medical spa business. It is our mission To Provide an All-in-One Cutting Edge Software to the Aesthetics Industry.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of DropCSS!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript HTML XHTML, JavaScript Software Development Software

Registered

2022-06-22