Skip to content

pantoken-root / packages/core/src / isContextual

函数: isContextual() ​

isContextual(value): boolean

Beta

当一个值不能作为类型化的 @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