Skip to content

pantoken / renderers/pendo/src / addScope

Variable: addScope

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

Beta

Create the @scope wrapping plugin.

Type Declaration

Parameters

options?

AddScopeOptions

Returns

Plugin

postcss

postcss: true

Required PostCSS plugin marker.

Example

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 (._pendo-step-container) { .x{color:red} }"