DropCSS
A simple, thorough and fast unused-CSS cleaner
- Free • Open Source
- Self-Hosted
- CSS
More ▼
What is DropCSS?
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.
• 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.
Show full description ▾
Features Vote on or suggest new features
This app doesn't have any features at the moment.Supported Languages
- English
More ▼
Comments and Reviews Post a comment / review all • positive • negative relevance • date
No comments or reviews, maybe you want to be first?Tags
- development
- css-development
- unused-css
- css3
- CSS / Stylesheets
No screenshots yet
DropCSS
Summary
Our users have written 0 comments and reviews about DropCSS, and it has gotten 0 likes
- Developed by Leon Sorokin
- Open Source (MIT) and Free product.
- 5 alternatives listed
GitHub repository
- 2,111 Stars
- 66 Forks
- 11 Open Issues
- Updated Apr 27, 2022
Popular alternatives
- 1
- 2
- 3
DropCSS was added to AlternativeTo by POX on Mar 26, 2019 and this page was last updated Mar 26, 2019.