Skip to content

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

Variabel: pruneCustomProps

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

Beta

Skapa prune-unused-custom-properties PostCSS-plugin.

Type Declaration

Returnerar

Plugin

Ett PostCSS tillägg.

postcss

postcss: true

Obligatorisk PostCSS-pluginmarkör.

Exempel

Kör det som ett fristående PostCSS-pass

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