Skip to content

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

Μεταβλητή: pruneCustomProps ​

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

Βήτα

Δημιουργήστε το plugin PostCSS prune-unused-custom-properties.

Type Declaration ​

Επιστρέφει ​

Plugin

Ένα PostCSS Πρόσθετο.

postcss ​

postcss: true

Απαιτούμενος δείκτης plugin PostCSS.

Παράδειγμα ​

Εκτελέστε το ως ξεχωριστή διέλευση PostCSS

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