Skip to content

pantoken-root / packages/core/src / isContextual

Function: isContextual() ​

isContextual(value): boolean

Beta

True when a value cannot be a typed @property initial-value (var() / light-dark()).

Parameters ​

value ​

string

Returns ​

boolean

Example ​

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

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