Skip to content

Latest commit

 

History

History
119 lines (82 loc) · 1.74 KB

File metadata and controls

119 lines (82 loc) · 1.74 KB

value-list-comma-space-before

Require a single space or disallow whitespace before the commas of value lists.

a { background-size: 0 ,0; }
/**                    ↑
 * The space before these commas */

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

选项

string: "always"|"never"|"always-single-line"|"never-single-line"

"always"

There must always be a single space before the commas.

以下模式被视为违规:

a { background-size: 0,0; }
a { background-size: 0
      , 0; }

以下模式被视为违规:

a { background-size: 0 ,0; }
a { background-size: 0 ,
      0; }

"never"

There must never be whitespace before the commas.

以下模式被视为违规:

a { background-size: 0 ,0; }
a { background-size: 0 ,
      0; }

以下模式被视为违规:

a { background-size: 0,0; }
a { background-size: 0,
      0; }

"always-single-line"

There must always be a single space before the commas in single-line value lists.

以下模式被视为违规:

a { background-size: 0,0; }

以下模式被视为违规:

a { background-size: 0 ,0; }
a { background-size: 0 ,
      0; }
a { background-size: 0
      , 0; }

"never-single-line"

There must never be whitespace before the commas in single-line value lists.

以下模式被视为违规:

a { background-size: 0 ,0; }

以下模式被视为违规:

a { background-size: 0,0; }
a { background-size: 0,
      0; }
a { background-size: 0 ,
      0; }