Skip to content

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

משתנה: pruneCustomProps ​

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

בטא

צור את התוסף prune-unused-custom-properties של PostCSS.

Type Declaration ​

מחזיר ​

Plugin

תוסף של PostCSS תוסף.

postcss ​

postcss: true

סמן דרוש לתוסף 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