Skip to main content

function-disallowed-list

指定不允许的函数列表。

¥Specify a list of disallowed functions.

a { transform: scale(1); }
/** ↑

* This function */

message 次要选项 可以接受该规则的参数。

¥The message secondary option can accept the arguments of this rule.

选项

¥Options

Array<string>

["array", "of", "unprefixed", "functions", "/regex/"]

鉴于:

¥Given:

{
"function-disallowed-list": ["scale", "rgba", "/linear-gradient/"]
}

以下模式被视为问题:

¥The following patterns are considered problems:

a { transform: scale(1); }
a {
color: rgba(0, 0, 0, 0.5);
}
a {
background:
red,
-moz-linear-gradient(45deg, blue, red);
}

以下模式不被视为问题:

¥The following patterns are not considered problems:

a { background: red; }