TopAlter.com

UnCSS Alternatives

UnCSS Alternatives

UnCSS

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 removes the unused rules is as follows:

1. The HTML files are loaded by jsdom and JavaScript is executed.
2. All the stylesheets are parsed by PostCSS.
2. document.querySelector filters out selectors that are not found in the HTML files.
4. The remaining rules are converted back to CSS.

Please note:

• UnCSS cannot be run on non-HTML pages, such as templates or PHP files. If you need to run UnCSS against your templates, you should probably generate example HTML pages from your templates, and run uncss on those generated files; or run a live local dev server, and point uncss at that.
• UnCSS only runs the Javascript that is run on page load. It does not (and cannot) handle Javascript that runs on user interactions like button clicks. You must use the ignore option to preserve classes that are added by Javascript on user interaction.

Best UnCSS Alternatives

Hate UnCSS? Use another browser! Which one should you go with? Try out these other browsers before making your final decision. Want some more context? We've got a great list of alternatives to UnCSS here.

DropCSS

DropCSS

FreeOpen SourceSelf-HostedCSS

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...

Purgecss

Purgecss

FreeOpen SourceSelf-HostedCSS

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...

PurifyCSS

PurifyCSS

FreeOpen SourceSelf-HostedCSS

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...

Upvote Comparison

Interest Trends

UnCSS Reviews

Add your reviews & share your experience when using UnCSS to the world. Your opinion will be useful to others who are looking for the best UnCSS alternatives.

Copyright © 2021 TopAlter.com

Sites we Love: AnswerBun, MenuIva, UKBizDB, Sharing RPP