Skip to content

Latest commit

 

History

History
125 lines (86 loc) · 1.85 KB

File metadata and controls

125 lines (86 loc) · 1.85 KB

function-comma-space-before

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

a { transform: translate(1 ,1) }
/**                        ↑
 * 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 { transform: translate(1,1) }
a { transform: translate(1, 1) }

以下模式被视为违规:

a { transform: translate(1 ,1) }
a { transform: translate(1 , 1) }

"never"

There must never be whitespace before the commas.

以下模式被视为违规:

a { transform: translate(1 ,1) }
a { transform: translate(1 , 1) }

以下模式被视为违规:

a { transform: translate(1,1) }
a { transform: translate(1, 1) }

"always-single-line"

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

以下模式被视为违规:

a { transform: translate(1,1) }
a { transform: translate(1, 1) }

以下模式被视为违规:

a { transform: translate(1 ,1) }
a { transform: translate(1 , 1) }
a {
  transform: translate(1,
    1)
}

"never-single-line"

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

以下模式被视为违规:

a { transform: translate(1 ,1) }
a { transform: translate(1 , 1) }

以下模式被视为违规:

a { transform: translate(1,1) }
a { transform: translate(1, 1) }
a {
  transform: translate(1 ,
    1)
}