Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Css Class Collector (Purge CSS)

No security coverage Under active development 1 sites

This module automatically scans your Drupal site and collects all CSS classes used in database-driven content. It generates a list of actually used CSS classes, which is useful for CSS optimization workflows that require accurate safelists to prevent the removal of dynamic or backend-generated classes.

CSS Class Collector (useful for CSS purging)

The CSS Class Collector module automatically scans your Drupal site
and collects all CSS classes used in database-driven content.

It generates a reliable, real-world list of CSS classes actually used across the site.
This is especially useful for projects using PurgeCSS,
Tailwind CSS, Bootstrap, or any CSS optimization
workflow that depends on accurate safelists to prevent removal of dynamic or
backend-generated classes.

By using this module, you can safely purge unused CSS without breaking layouts
or functionality.

Steps to purge CSS(if using bootstrap_barrio as base theme)

  1. Copy bootstrap.min.css and build-css.js from the module
    into your custom theme directory root.
  2. Run the following command from the custom theme directory:
    node build-css.js
Drupal 10–11

Ask your assistant about Css Class Collector (Purge CSS)

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • block_content Drupal core
  • node Drupal core
  • paragraphs Drupal core
  • views Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Nov 2025
Latest release
1 month ago
Releases (12 mo)
6 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.5 Stable 10–11 Sep 6, 2026
1.0.4 Stable 10–11 Dec 29, 2025
1.0.3 Stable 10–11 Dec 29, 2025
1.0.2 Stable 10 Dec 29, 2025
1.0.0 Stable 10 Nov 26, 2025
1.0.x-dev Dev 10 Nov 26, 2025