property-disallowed-list
指定不允许的属性列表。
¥Specify a list of disallowed properties.
a { text-rendering: optimizeLegibility; }
/** ↑
* This property */
message
次要选项 可以接受该规则的参数。
¥The message
secondary option can accept the arguments of this rule.
选项
¥Options
array|string|regex
:["array", "of", /properties/, "regex"]|"property"|"/regex/"|/regex/
如果字符串被 "/"
包围(例如 "/^background/"
),则它被解释为正则表达式。例如,这可以轻松定位简写:/^background/
将匹配 background
、background-size
、background-color
等。
¥If a string is surrounded with "/"
(e.g. "/^background/"
), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: /^background/
will match background
, background-size
, background-color
, etc.
鉴于:
¥Given:
["text-rendering", "animation", "/^background/"]
以下模式被视为问题:
¥The following patterns are considered problems:
a { text-rendering: optimizeLegibility; }
a {
animation: my-animation 2s;
color: pink;
}
a { -webkit-animation: my-animation 2s; }
a { background: pink; }
a { background-size: cover; }
以下模式不被视为问题:
¥The following patterns are not considered problems:
a { color: pink; }
a { no-background: sure; }