When you are building a website, chances are that you are using a CSS framework like Bootstrap, Materializecss, Foundation, etc. But you will only use a small set of the framework and a lot of unused CSS styles will be included. This is where PurgeCSS comes into play. PurgeCSS analyzes your content and your CSS files. Then it matches the selectors used in your files with the ones in your content files. It removes unused selectors from your CSS, resulting in smaller CSS files. PurgeCSS has a list of options that allow you to customize its behavior. Customization can improve the performance and efficiency of PurgeCSS. The configuration file is a simple JavaScript file. By default, the JavaScript API will look for purgecss.config.js. You can then use PurgeCSS with the config file. PurgeCSS also works with raw content. To do this, you need to pass an object with the raw property instead of a filename.

Features

  • PurgeCSS can be adapted to suit your needs
  • Programmatic API
  • Command Line Interface
  • It removes unused selectors from your CSS
  • PurgeCSS also works with raw CSS
  • You can specify content that should be analyzed by PurgeCSS

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow PurgeCSS

PurgeCSS Web Site

You Might Also Like
Red Hat Ansible Automation Platform on Microsoft Azure Icon
Red Hat Ansible Automation Platform on Microsoft Azure

Red Hat Ansible Automation Platform on Azure allows you to quickly deploy, automate, and manage resources securely and at scale.

Deploy Red Hat Ansible Automation Platform on Microsoft Azure for a strategic automation solution that allows you to orchestrate, govern and operationalize your Azure environment.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of PurgeCSS!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Software Development Software

Registered

2022-06-15