Require a single space or disallow whitespace after the opening brace of blocks.
a { color: pink; }
/** ↑
* The space after 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 after the opening brace.
以下模式被视为违规:
a {color: pink; }
a {
color: pink; }
以下模式不被视为违规:
a { color: pink; }
a { color: pink;
}
There must never be whitespace after the opening brace.
以下模式被视为违规:
a { color: pink; }
a {
color: pink; }
以下模式不被视为违规:
a {color: pink; }
a
{color: pink; }
There must always be a single space after the opening brace in single-line blocks.
以下模式被视为违规:
a {color: pink; }
以下模式不被视为违规:
a { color: pink; }
a {color: pink;
}
There must never be whitespace after the opening brace in single-line blocks.
以下模式被视为违规:
a { color: pink; }
以下模式不被视为违规:
a {color: pink; }
a { color: pink;
}
There must always be a single space after the opening brace in multi-line blocks.
以下模式被视为违规:
a {color: pink;
}
以下模式不被视为违规:
a {color: pink; }
a { color: pink;
}
There must never be whitespace after the opening brace in multi-line blocks.
以下模式被视为违规:
a { color: pink;
}
以下模式不被视为违规:
a { color: pink; }
a {color: pink;
}