Download the PHP package jbsnewmedia/css-purger without Composer
On this page you can find all versions of the php package jbsnewmedia/css-purger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package css-purger
CssPurger
CssPurger is a lightweight PHP library to remove unused CSS rules from large stylesheets. Itβs perfect for optimizing CSS frameworks like Bootstrap based on actual usage in your project.
π§© Installation
Install via Composer:
π Features
- Removes unused CSS based on custom-defined selectors
- Supports nested blocks (e.g.
@media) - Fully supports selectors with pseudo-classes like
:hover,:focus, etc. - Output as minified or pretty-printed CSS
- Easily extendable via subclassing
- No external dependencies
- Bootstrap integration example included
π§ Usage
π§ Extendability
You can subclass CssPurger to customize parsing or handling, e.g. for Bootstrap-specific structures:
β οΈ Notes
- This is not a full CSS parser β it uses lightweight string-based logic for performance
- You must explicitly define which selectors to keep
π License
MIT License β free for personal and commercial use.
π€ Contributing
Pull requests, bug reports and ideas for improvements are always welcome!
π§βπ» Author
Maintained by JBS New Media.
All versions of css-purger with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.4
The package jbsnewmedia/css-purger contains the following files
Loading the files please wait ...