本文へスキップ

function-allowed-list

許可する関数のリストを指定します。

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

このルールの引数には、message セカンダリオプション を使用できます。

オプション

array|string|regex: ["array", "of", "unprefixed", /functions/, "/regex/"]|"function"|"/regex/"|/regex/

文字列が"/"で囲まれている場合(例:"/^rgb/")、正規表現として解釈されます。

["scale", "rgba", "/linear-gradient/"]

次のパターンは問題と見なされます

a { transform: rotate(1); }
a {
color: hsla(170, 50%, 45%, 1)
}
a {
background:
red,
-webkit-radial-gradient(red, green, blue);
}

次のパターンは問題と見なされません

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