指定允许的属性的白名单。
a { display: block; }
/** ↑
* 这个属性 */
此规则忽略变量($sass、@less、--custom-property)。
array|string: ["array", "of", "unprefixed", /properties/ or "regex"]|"property"|"/regex/"|/regex/
如果字符串用 "/" 包围(例如 "/^background/"),则将其解释为正则表达式。这允许方便的简写,例如:/^background/ 将匹配 background、background-size、background-color 等。
给定:
["display", "animation", "/^background/"]
以下模式被视为违规:
a { color: pink; }
a {
animation: my-animation 2s;
color: pink;
}
a { borkgrund: orange; }
以下模式不被视为违规:
a { display: block; }
a { -webkit-animation: my-animation 2s; }
a {
animation: my-animation 2s;
-webkit-animation: my-animation 2s;
display: block;
}
a { background: pink; }
a { background-color: pink; }