Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-line function/mixin calls should be acceptable when enforcing space-between-parens and indentation #260

Closed
BPScott opened this issue Oct 8, 2015 · 1 comment · Fixed by #289
Assignees

Comments

@BPScott
Copy link

BPScott commented Oct 8, 2015

Sometimes the argument list when calling functions/mixins ends up being quite long so it is nice to put them onto multiple lines to make it them more readable. However currently this throws a combination of warnings - two space-between-parens (one for the opening paren, one for the closing paren) and an indentation warning for every line within the arguments. This occurs for native CSS functions (e.g. linear-gradient()), user-defined functions and mixins. To see this in action, run the following scss with the ruleset {'indentation': 1, 'space-between-parens': 1}:

// Top-level mixin
@include hello(
  $foo,
  $bar,
  $baz
);

.foo {
  // Nested Mixin
  @include hello(
    $foo,
    $bar,
    $baz
  );

  // CSS built-in function
  background: transparent linear-gradient(
    to bottom,
    #ff0000 0%,
    #00ff00 40%,
    #0000ff 40%
  );

  // User-defined function
  content: goodbye(
    $foo,
    $bar
  );
}

I would expect this to raise no warnings.

@DanPurdy DanPurdy added the bug label Oct 9, 2015
@DanPurdy DanPurdy added this to the 1.4.0 milestone Oct 9, 2015
@bgriffith bgriffith self-assigned this Oct 9, 2015
@bgriffith
Copy link
Member

Have this fixed locally for the space-between-parens rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants