Skip to content

Files

Latest commit

 

History

History
123 lines (83 loc) · 1.86 KB

function-comma-space-after.md

File metadata and controls

123 lines (83 loc) · 1.86 KB

Pattern: Malformed whitespace after , in function

Issue: -

Description

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

Examples

"always"

There must always be a single space after 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 after 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 after 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 after 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