property-disallowed-list
指定禁止使用的属性列表。
a { text-rendering: optimizeLegibility; }
/** ↑
* This property */
该 message 次要选项 可以接受此规则的参数。
选项
array|string|regex: ["array", "of", /properties/, "regex"]|"property"|"/regex/"|/regex/
如果字符串用 "/" 括起来(例如 "/^background/"),则将其解释为正则表达式。例如,这允许轻松地定位简写:/^background/ 将匹配 background、background-size、background-color 等。
给定
["text-rendering", "animation", "/^background/"]
以下模式被认为是问题
a { text-rendering: optimizeLegibility; }
a {
animation: my-animation 2s;
color: pink;
}
a { -webkit-animation: my-animation 2s; }
a { background: pink; }
a { background-size: cover; }
以下模式不被认为是问题
a { color: pink; }
a { no-background: sure; }