Skip to content

Variable: SCOPE_PRELUDE_BASE ​

ts
const SCOPE_PRELUDE_BASE: Regex<"\\(\\s*\\.(?<base>[A-Za-z_][\\w-]*)\\s*\\)", {
  flags: "u";
  names: {
     base: string;
  };
}>;

Defined in: packages/regex/src/tiers/cssdoc-local.ts:182

Scope Prelude Base Pattern Extracts bare class name from @scope prelude (e.g., (.pfx-alert)) Used to determine scope ownership for &/:scope resolution.

Example ​

ts
SCOPE_PRELUDE_BASE.exec("(.button)")?.groups?.base // "button"

Released under the MIT License