Skip to content

pantoken-root / packages/core/src / isContextual

Funktion: isContextual() ​

isContextual(value): boolean

Beta

Wahr, wenn ein Wert kein typisiertes @property-Initialwert (var() / light-dark()) sein kann.

Parameter ​

value ​

string

Rückgabe ​

boolean

Beispiel ​

ts
import { isContextual } from "@pantoken/core";

isContextual("var(--x)");            // → true
isContextual("light-dark(#fff, #000)"); // → true
isContextual("#fff");                // → false