Skip to content

Function: scopeMatchesBase() ​

ts
function scopeMatchesBase(preludeBase, baseNoDot): boolean;

Defined in: packages/core/src/parse.ts:63

Whether an @scope's prelude base is the record's own base — exactly, or as the literal prefix of an authored compound base selector built on it (e.g. a base of pfx-transition.-transition-fade-entering for a prelude of pfx-transition). Only when this holds does &/:scope inside that @scope mean "this record's own base" — otherwise the @scope belongs to a different record (commonly a parent component reaching into this one as a member, or a sibling part's own scope), and &/:scope there refer to THAT selector, not this record's.

Parameters ​

preludeBase ​

string | undefined

baseNoDot ​

string

Returns ​

boolean

Released under the MIT License