DropCSS is an unused CSS cleaner; it takes your HTML and CSS as input and returns only the used CSS as output. The core is simply some minimal glue between these awesome low-level tools:
• Fast HTML Parser
• CSSTree
• css-select
The entire logic for DropCSS is this ~60 line file.
It is recommended to also run your CSS through an optimizer like clean-css to group selectors, merge and remove redundant rules, purge unused keyframes, etc. Whether this is done before or after DropCSS is up to you, but since clean-css also minifies, it probably makes sense to run DropCSS first to avoid bouncing [and re-parsing] the output back and forth (optimize & minify -> drop) vs (optimize -> drop -> minify), though this will likely depend on your actual input; profiling is your friend.
A bit more on this project's backstory & discussions in /r/javascript and on Hacker News.
You're looking for the best programs similar to DropCSS. Check out our top picks. Below, let's see if there are any DropCSS alternatives that support your platform.
What is Purgecss? When you are building a website, chances are that you are using a CSS framework like Bootstrap, Materializecss, Foundation, etc... But you will only...
A function that takes content (HTML/JS/PHP/etc) and CSS, and returns only the used CSS. PurifyCSS does not modify the original CSS files. You can write to a new file...
UnCSS is a tool that removes unused CSS from your stylesheets. It works across multiple files and supports Javascript-injected CSS. How? The process by which UnCSS...
Add your reviews & share your experience when using DropCSS to the world. Your opinion will be useful to others who are looking for the best DropCSS alternatives.
Table of Contents
Popular Alternatives
iOS Alternatives
Android Alternatives
Copyright © 2021 TopAlter.com
Sites we Love: AnswerBun, MenuIva, UKBizDB, Sharing RPP