Skip to content

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

变量: pruneCustomProps

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

Beta

创建 prune-unused-custom-properties PostCSS 插件。

Type Declaration

返回值

Plugin

一个 PostCSS 插件

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