Skip to content

pantoken-root / packages/core/src / isContextual

関数: isContextual() ​

isContextual(value): boolean

ベータ

値が型付きの @property の初期値(var() / light-dark())になり得ないときに true。

パラメーター ​

value ​

string

戻り値 ​

boolean

例 ​

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

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