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

Bug: indentation breaks when AtRules and Rules have different indentation #56

Closed
kristerkari opened this issue Dec 31, 2015 · 0 comments
Labels

Comments

@kristerkari
Copy link
Contributor

Indentation breaks when formatting this code (it should not change):

.class {
  @for $i from 1 through 10 {
    color: green;

    div {
      color: blue;
    }
  }
  color: white;
}
    expected: |-
      '.class {\n  @for $i from 1 through 10 {\n    color: green;\n\n    div {\n      color: blue;\n    }\n  }\n  color: white;\n}\n'
    actual: |-
      '.class {\n  @for $i from 1 through 10 {\n    color: green;\n\n    div {\n    color: blue;\n    }\n  }\n  color: white;\n}\n'

Everything works correctly if I remove the AtRule:

.class {
  div {
    color: green;

    div {
      color: blue;
    }
  }
  color: white;
}
@matype matype added the bug label Jan 2, 2016
@matype matype closed this as completed in c5e98f1 Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants