Skip to content

Variable: RSCSS_VARIANT ​

ts
const RSCSS_VARIANT: Regex<"\\.-(?<name>[a-z][\\w-]*)", {
  flags: "u";
  names: {
     name: string;
  };
}>;

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

RSCSS Variant Pattern Matches RSCSS variant naming: dash-prefixed modifier on components and elements. Applied to both components and their elements: .-wide, .-disabled, .-small Pattern: .-variant-name Used for RSCSS variant/modifier extraction.

Example ​

ts
RSCSS_VARIANT.exec(".-wide")?.groups?.name // "wide"
RSCSS_VARIANT.exec(".-disabled")?.groups?.name // "disabled"
RSCSS_VARIANT.exec(".-small")?.groups?.name // "small"

Released under the MIT License