Skip to content

pantoken-root / renderers/pendo/src / addScope

變數: addScope ​

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

Beta(測試)

建立 @scope 包裝外掛。

Type Declaration ​

參數 ​

options? ​

AddScopeOptions

回傳 ​

Plugin

postcss ​

postcss: true

必要的 PostCSS 外掛標記。

範例 ​

ts
import postcss from "postcss";
import { addScope } from "@pantoken/pendo";

const { css } = postcss([addScope({ selector: "._pendo-step-container" })])
  .process(".x{color:red}", { from: undefined });
// "@scope ([class*=\"instui\"]._pendo-step-container) { .x{color:red} }"