pantoken / plugins/postcss/prune-custom-props/src / pruneCustomProps
Function: pruneCustomProps()
pruneCustomProps():
Plugin
Beta
Create the prune-unused-custom-properties PostCSS plugin.
Returns
A PostCSS Plugin.
Example
Run it as a standalone PostCSS pass
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