Skip to content

pantoken-root / plugins/postcss/props-minify/src / pruneCustomProps

Variable: pruneCustomProps ​

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

Bêta

Créer le plugin PostCSS prune-unused-custom-properties.

Type Declaration ​

Renvoie ​

Plugin

Un Plugin PostCSS.

postcss ​

postcss: true

Marqueur requis pour le plugin PostCSS.

Exemple ​

Exécutez-le en tant que passe PostCSS autonome

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