Skip to content

pantoken / plugins/postcss/prune-custom-props/src / pruneCustomProps

Variable: pruneCustomProps

const pruneCustomProps: {(): Plugin; postcss: true; }

Beta

Creeu el connector PostCSS prune-unused-custom-properties.

Type Declaration

Retorna

Plugin

Un connector de PostCSS.

postcss

postcss: true

Marcador requerida del connector de PostCSS.

Exemple

Executeu-lo com a una passada PostCSS autònoma

ts
import postcss from "postcss";
import { pruneCustomProps } from "@pantoken/plugin-prune-custom-props";

const out = postcss([pruneCustomProps()]).process(css, { from: undefined }).css;
// only the --instui-* custom properties reachable from real declarations survive