Home > purgecss > UserDefinedOptions

UserDefinedOptions interface

Options used by PurgeCSS to remove unused CSS

Signature:

export interface UserDefinedOptions 

Properties

PropertyModifiersTypeDescription
blocklist?StringRegExpArray(Optional) Blocklist will block the CSS selectors from appearing in the final output CSS. The selectors will be removed even when they are seen as used by PurgeCSS.
contentArray<string | RawContent>You can specify content that should be analyzed by PurgeCSS with an array of filenames or globs. The files can be HTML, Pug, Blade, etc.
cssArray<string | RawCSS>Similar to content, you can specify css that should be processed by PurgeCSS with an array of filenames or globs
defaultExtractor?ExtractorFunction(Optional)
dynamicAttributes?string[](Optional) Option to add custom CSS attribute selectors like "aria-selected", "data-selected", ...etc.
extractors?Array<Extractors>(Optional)
fontFace?boolean(Optional) If there are any unused @font-face rules in your css, you can remove them by setting the fontFace option to true.
keyframes?boolean(Optional)
output?string(Optional)
rejected?boolean(Optional)
rejectedCss?boolean(Optional)
safelist?UserDefinedSafelist(Optional) You can indicate which selectors are safe to leave in the final CSS. This can be accomplished with the option safelist.
skippedContentGlobs?Array<string>(Optional) If you provide globs for the content parameter, you can use this option to exclude certain files or folders that would otherwise be scanned. Pass an array of globs matching items that should be excluded. (Note: this option has no effect if content is not globs.)
sourceMap?boolean | (postcss.SourceMapOptions & { to?: string; })(Optional)
stdin?boolean(Optional)
stdout?boolean(Optional)
variables?boolean(Optional)