Skip to content

Variable: RSCSS_ELEMENT ​

ts
const RSCSS_ELEMENT: Regex<">\\s*\\.(?<element>[a-z]+)", {
  flags: "u";
  names: {
     element: string;
  };
}>;

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

RSCSS Element Selector Pattern Matches RSCSS element selector with child combinator: > .element Elements are single-word classnames using > to prevent bleeding through nested components. Pattern: > .element-name (single word, no hyphens) Used for identifying RSCSS element selectors in CSS rules.

Example ​

ts
RSCSS_ELEMENT.exec("> .title")?.groups?.element // "title"
RSCSS_ELEMENT.exec("> .avatar")?.groups?.element // "avatar"
RSCSS_ELEMENT.exec(">  .firstname")?.groups?.element // "firstname"

Released under the MIT License