declaration-property-max-values
限制声明中属性列表的值的数量。
¥Limit the number of values for a list of properties within declarations.
message
次要选项 可以接受该规则的参数。
¥The message
secondary option can accept the arguments of this rule.
选项
¥Options
object
:{ "unprefixed-property-name": int }
如果属性名称被 "/"
包围(例如 "/^margin/"
),则它被解释为正则表达式。例如,这可以轻松定位简写:/^margin/
将匹配 margin
、margin-top
、margin-inline
等。
¥If a property name is surrounded with "/"
(e.g. "/^margin/"
), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: /^margin/
will match margin
, margin-top
, margin-inline
, etc.
鉴于:
¥Given:
{
"border": 2,
"/^margin/": 1
}
以下模式被视为问题:
¥The following patterns are considered problems:
a { border: 1px solid blue; }
a { margin: 1px 2px; }
a { margin-inline: 1px 2px; }
以下模式不被视为问题:
¥The following patterns are not considered problems:
a { border: 1px solid; }
a { margin: 1px; }
a { margin-inline: 1px; }