Skip to content

pantoken / plugins/postcss/props-minify/src / pruneCustomProps

Biến: pruneCustomProps

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

Beta

Tạo plugin PostCSS prune-unused-custom-properties.

Type Declaration

Trả về

Plugin

Một Plugin cho PostCSS.

postcss

postcss: true

Ký hiệu bắt buộc của plugin PostCSS.

Ví dụ

Chạy nó như một lần xử lý PostCSS độc lập

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