declaration-block-single-line-max-declarations
限制单行声明块内的声明数量。
¥Limit the number of declarations within a single-line declaration block.
a { color: pink; top: 0; }
/** ↑ ↑
* The number of these declarations */
message
次要选项 可以接受该规则的参数。
¥The message
secondary option can accept the arguments of this rule.
选项
¥Options
number
指定允许的最大声明数量。
¥Specify a maximum number of declarations allowed.
鉴于:
¥Given:
{
"declaration-block-single-line-max-declarations": 1
}
以下模式被视为问题:
¥The following patterns are considered problems:
a { color: pink; top: 3px; }
a,
b { color: pink; top: 3px; }
以下模式不被视为问题:
¥The following patterns are not considered problems:
a { color: pink; }
a,
b { color: pink; }
a {
color: pink;
top: 3px;
}