Skip to content

Function: selectorDefines()

ts
function selectorDefines(selectorText, selector): boolean;

Defined in: packages/providers/src/aspects.ts:59

Whether selectorText (the record's concatenated selectors) defines the modifier/part selector (.name, where name may be a * glob for a family like .-icon-*; a name with no * is exact). Beyond a literal class token, class attribute selectors count with their real CSS operator semantics — [class~=v]/[class=v] (exact word), [class*=v] (substring), and [class$=v] (suffix) can define a chained modifier; [class^=v] cannot, since ^= anchors to the start of the whole attribute (the base class), never a chained modifier.

Parameters

selectorText

string

selector

string

Returns

boolean

Released under the MIT License