Skip to content

pantoken-root / packages/core/src / isContextual

Ֆունկցիա: isContextual() ​

isContextual(value): boolean

Բետա

Ճշմարիտ, երբ արժեքը չի կարող լինել typed @property initial-value (var() / light-dark()):

Պարամետրեր ​

value ​

string

Վերադարձվող արժեք ​

boolean

Օրինակ ​

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

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