Skip to content

Latest commit

 

History

History
95 lines (66 loc) · 1.15 KB

File metadata and controls

95 lines (66 loc) · 1.15 KB

selector-attribute-brackets-space-inside

Require a single space or disallow whitespace on the inside of the brackets within attribute selectors.

    [ target=_blank ]
/** ↑               ↑
 * The space inside these two brackets */

命令行中的 --fix 选项可以自动修复此规则报告的所有问题。

选项

string: "always"|"never"

"always"

There must always be a single space inside the brackets.

以下模式被视为违规:

[target] {}
[ target] {}
[target ] {}
[target=_blank] {}
[ target=_blank] {}
[target=_blank ] {}

以下模式被视为违规:

[ target ] {}
[ target=_blank ] {}

"never"

There must never be whitespace on the inside the brackets.

以下模式被视为违规:

[ target] {}
[target ] {}
[ target ] {}
[ target=_blank] {}
[target=_blank ] {}
[ target=_blank ] {}

以下模式被视为违规:

[target] {}
[target=_blank] {}