Skip to content

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

Переменная: pruneCustomProps ​

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

Бета

Создать плагин PostCSS prune-unused-custom-properties.

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