Skip to content

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

Variabele: pruneCustomProps

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

Bèta

Maak de prune-unused-custom-properties PostCSS-plugin.

Type Declaration

Retourneert

Plugin

Een PostCSS plugin.

postcss

postcss: true

Vereist marker voor PostCSS-plugin.

Voorbeeld

Voer het uit als een op zichzelf staande 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