Skip to content

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

Variabel: pruneCustomProps ​

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

Beta

Opret prune-unused-custom-properties PostCSS-plugin'en.

Type Declaration ​

Returnerer ​

Plugin

Et PostCSS Plugin.

postcss ​

postcss: true

Påkrævet PostCSS plugin marker.

Eksempel ​

Kør det som en selvstændig 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