Skip to content

pantoken-root / packages/core/src / isContextual

함수: isContextual() ​

isContextual(value): boolean

베타

값이 타입이 지정된 @property의 초기값(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