function-whitelist
Deprecated: Instead use the function-allowed-list
rule.
Specify a list of allowed functions.
transform: scale(1); }
a { /** ↑
* This function */
Options
array|string
:
["array", "of", "unprefixed", /functions/ or "regex"]|"function"|"/regex/"
If a string is surrounded with "/"
(e.g. "/^rgb/"
), it is interpreted as a regular
expression.
Given:
["scale", "rgba", "linear-gradient"]
The following patterns are considered violations:
transform: rotate(1); } a {
a {color: hsla(170, 50%, 45%, 1)
}
a {background:
red,
(red, green, blue);
-webkit-radial-gradient }
The following patterns are not considered violations:
background: red; } a {
transform: scale(1); } a {
a {color: rgba(0, 0, 0, 0.5);
}
a {background:
red,
(45deg, blue, red);
-moz-linear-gradient }