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 > setAsUsed

VariablesStructure.setAsUsed() method

Mark every declaration of the variable as used. The variables it uses are not marked, removeUnused adds them to the used variables first.

Signature:

setAsUsed(variableName: string): void;

Parameters

Parameter

Type

Description

variableName

string

name of the variable, e.g. --color

Returns:

void