Skip to content

Inconsistent new lines in expanded output #2114

@battaglr

Description

@battaglr

When using the extended syntax, I get inconsistent rule separation inside and outside media queries.

Input:

.Test-1 {
  color: black;
}

.Test-2 {
  color: white;
}

@media screen {
  .Test-1 {
    color: black;
  }

  .Test-2 {
    color: white;
  }
}

Output:

.Test-1 {
  color: black;
}

.Test-2 {
  color: white;
}

@media screen {
  .Test-1 {
    color: black;
  }
  .Test-2 {
    color: white;
  }
}

Expected:

.Test-1 {
  color: black;
}

.Test-2 {
  color: white;
}

@media screen {
  .Test-1 {
    color: black;
  }

  .Test-2 {
    color: white;
  }
}

I'm using node-sass v3.8.0 and the CLI to compile: node-sass --output-style expanded input.scss output.css.

I know this is just a style thing, but it was not the output I expected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions