PurgeCSSPurgeCSS
API Reference
  • English
  • Français
GitHub
API Reference
  • English
  • Français
GitHub
  • PurgeCSS

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

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

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

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

Home > purgecss > VariablesStructure > addVariableUsage

VariablesStructure.addVariableUsage() method

Warning: This API is now obsolete.

The variables used by a custom property are found by name in removeUnused, so the dependencies between declarations are no longer recorded and this method does nothing. It will be removed in the next major version.

Signature:

addVariableUsage(declaration: postcss.Declaration, matchedVariables: IterableIterator<RegExpMatchArray>): void;

Parameters

Parameter

Type

Description

declaration

postcss.Declaration

matchedVariables

IterableIterator<RegExpMatchArray>

Returns:

void