Skip to content

pantoken / 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

Retourne

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