PurgeCSSPurgeCSS
API Reference
GitHub
API Reference
GitHub
  • PurgeCSS

    • About PurgeCSS
    • Getting Started
    • Configuration
    • Command Line Interface
    • Programmatic API
    • Safelisting
    • Extractors
  • Plugins

    • PostCSS
    • Webpack
    • Gulp
    • Grunt
    • Gatsby
  • Guides

    • Vue
    • React
    • Next.js
    • Nuxt.js
    • Razzle
    • WordPress
    • Hugo
  • Comparison
  • Common Questions

    • How to use with CSS modules
    • How to use with Ant Design

Home > purgecss > PurgeCSS > walkThroughCSS

PurgeCSS.walkThroughCSS() method

Walk through the CSS AST and remove unused CSS

Signature:

walkThroughCSS(root: PostCSSRoot, selectors: ExtractorResultSets): void;

Parameters

Parameter

Type

Description

root

PostCSSRoot

root node of the postcss AST

selectors

ExtractorResultSets

selectors used in content files

**Returns:**

void

Edit this page