Skip to content

Variable: SLOTTED_PSEUDO ​

ts
const SLOTTED_PSEUDO: Regex<"::slotted\\((?<selector>[^)]+)\\)", {
  flags: "u";
  names: {
     selector: string;
  };
}>;

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

Shadow DOM Slot Pseudo-Element Pattern Matches ::slotted(selector) pseudo-element for slot selection. Used to extract selector or class name from slotted pseudo-element.

Example ​

ts
SLOTTED_PSEUDO.exec("::slotted(.icon)")?.groups?.selector // ".icon"

Released under the MIT License