Skip to content

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

變數: pruneCustomProps

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

Beta(測試)

建立 prune-unused-custom-properties PostCSS 外掛程式。

Type Declaration

回傳

Plugin

一個 PostCSS Plugin

postcss

postcss: true

必要的 PostCSS 外掛標記。

範例

作為獨立的 PostCSS 執行階段執行它

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