Skip to content

Latest commit

 

History

History
110 lines (81 loc) · 1.68 KB

at-function-named-arguments.md

File metadata and controls

110 lines (81 loc) · 1.68 KB

Pattern: Malformed named parameter in function call

Issue: -

Description

Require or disallow named parameters in SCSS function call rule.

animation: animation($duration: 250ms) {
//
// Require or disallow this

Examples

string: "always"|"never"

always

The following patterns are considered warnings:

.foo {
  animation: animation(250ms, 100ms, infinite);
} 
.foo {
  animation: animation(250ms);
} 
.foo {
  border: reset($value: 20, 'bar', $color: #FFF);
}

The following patterns are not considered warnings:

.foo {
  animation: animation($duration: 250ms);
}
.foo {
  animation: animation($duration: 250ms, $delay: 100ms, $direction: infinite);
}

never

The following patterns are considered warnings:

.foo {
  border: reset($value: 20);
}
.foo {
  animation: animation($duration: 250ms, $delay: 100ms, $direction: infinite);
}
.foo {
  border: reset($value: 20, 'bar', $color: #FFF);
}

The following patterns are not considered warnings:

.foo {
  animation: animation(250ms, 100ms, infinite);
} 

Configuration

"ignore": ["single-argument"]

Given:

{ "ignore": ["single-argument"] }

The following patterns are not considered warnings:

.foo {
  @include animation($duration: 250ms);
}
.foo {
  @include reset(20);
}

Further Reading