Skip to content

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

Змінна: pruneCustomProps

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

Бета

Створити плагін PostCSS prune-unused-custom-properties.

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