UnCSS is a tool that removes unused CSS from your stylesheets. It works across multiple files and supports Javascript-injected CSS.
The process by which UnCSS removes the unused rules is as follows:
- The HTML files are loaded by jsdom and JavaScript is executed.
- All the stylesheets are parsed by PostCSS.
- document.querySelector filters out selectors that are not found in the HTML files.
- The remaining rules are converted back to CSS.
This is free and open source software.
Website: github.com/uncss/uncss
Support:
Developer: Giacomo Martino
License: MIT License
UnCSS is written in JavaScript. Learn JavaScript with our recommended free books and free tutorials.
Related Software
| CSS Code Formatters | |
|---|---|
| Prettier | Opinionated code formatter |
| CSScomb | Coding style formatter for CSS |
| UnCSS | Removes unused CSS from stylesheets |
| csscss | CSS redundancy analyzer |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Know a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

