DropCSS icon
DropCSS icon

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:

Cost / License

  • Free
  • Open Source

Platforms

  • Self-Hosted
  • CSS
-
No reviews
0likes
0comments
0news articles

Features

Suggest and vote on features
No features, maybe you want to suggest one?

 Tags

DropCSS News & Activities

Highlights All activities

Recent activities

No activities found.

DropCSS information

  • Developed by

    Leon Sorokin
  • Licensing

    Open Source (MIT) and Free product.
  • Alternatives

    5 alternatives listed
  • Supported Languages

    • English

AlternativeTo Category

Development

GitHub repository

  •  2,135 Stars
  •  66 Forks
  •  15 Open Issues
  •   Updated  
View on GitHub

Popular alternatives

View all
DropCSS was added to AlternativeTo by Paul on and this page was last updated .
No comments or reviews, maybe you want to be first?
Post comment/review

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.

Official Links