Skip to content

Files

Latest commit

 

History

History
123 lines (83 loc) · 1.87 KB

function-comma-space-before.md

File metadata and controls

123 lines (83 loc) · 1.87 KB

Pattern: Malformed whitespace before , in function

Issue: -

Description

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

Examples

"always"

There must always be a single space before the commas.

The following patterns are considered violations:

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

The following patterns are not considered violations:

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

"never"

There must never be whitespace before the commas.

The following patterns are considered violations:

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

The following patterns are not considered violations:

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.

The following patterns are considered violations:

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

The following patterns are not considered violations:

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

"never-single-line"

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

The following patterns are considered violations:

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

The following patterns are not considered violations:

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

Further Reading