Skip to content

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

Variabel: pruneCustomProps

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

Beta

Buat plugin PostCSS prune-unused-custom-properties.

Type Declaration

Mengembalikan

Plugin

Sebuah Plugin untuk PostCSS.

postcss

postcss: true

Penanda plugin PostCSS yang diperlukan.

Contoh

Jalankan sebagai langkah PostCSS mandiri

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