Require a single space or disallow whitespace before the closing brace of blocks.
a { color: pink; }
/** ↑
* The space before this brace */
命令行中的 --fix
选项可以自动修复此规则报告的所有问题。
string
: "always"|"never"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line"
There must always be a single space before the closing brace.
以下模式被视为违规:
a { color: pink;}
a
{ color: pink;}
以下模式不被视为违规:
a { color: pink; }
a {
color: pink; }
There must never be whitespace before the closing brace.
以下模式被视为违规:
a { color: pink; }
a
{ color: pink; }
以下模式不被视为违规:
a{ color: pink;}
a{
color: pink;}
There must always be a single space before the closing brace in single-line blocks.
以下模式被视为违规:
a { color: pink;}
以下模式不被视为违规:
a { color: pink; }
a {
color: pink;}
There must never be whitespace before the closing brace in single-line blocks.
以下模式被视为违规:
a { color: pink; }
以下模式不被视为违规:
a { color: pink;}
a {
color: pink; }
There must always be a single space before the closing brace in multi-line blocks.
以下模式被视为违规:
a {
color: pink;}
以下模式不被视为违规:
a { color: pink;}
a {
color: pink; }
There must never be whitespace before the closing brace in multi-line blocks.
以下模式被视为违规:
a {
color: pink; }
以下模式不被视为违规:
a { color: pink; }
a {
color: pink;}