Skip to content

Variable: CSSDOC_CUSTOM_PROPERTY ​

ts
const CSSDOC_CUSTOM_PROPERTY: Regex<"--(?<name>[\\w-]+)", {
  flags: "u";
  names: {
     name: string;
  };
}>;

Defined in: packages/regex/src/tiers/css-doc-grammar.ts:187

CssDoc Custom Property Reference from grammar. Reference to a CSS custom property (CSS variable). Pattern: -- followed by identifier.

Example ​

ts
CSSDOC_CUSTOM_PROPERTY.exec("--primary-color")?.groups?.name // "primary-color"

Released under the MIT License