Skip to content

pantoken / bundlers/postcss/src / pantoken

Variable: pantoken

const pantoken: {(options?): Plugin; postcss: true; }

Experimental

The pantoken PostCSS plugin.

Type Declaration

Parameters

options?

PantokenPostcssOptions

PantokenPostcssOptions.

Returns

Plugin

A PostCSS Plugin.

postcss

postcss: true

Required PostCSS plugin marker.

Examples

Register the plugin in postcss.config.js

js
import pantoken from "@pantoken/postcss";

export default { plugins: [pantoken()] };
// In your entry stylesheet, `@pantoken;` expands to the token stylesheet.

Expand a custom at-rule (atRule: "instui" instead of the default)

js
import { pantoken } from "@pantoken/postcss";

export default { plugins: [pantoken({ atRule: "instui" })] };