0

Trying to change multiline output from Sass to CSS conversion to single line output.

Sass:

p {
  font-size: 18px;
  color: red;
  
  span {
    color: blue;
  }
}

CSS multi-line (Sass default):

p {
  font-size: 18px;
  color: red;
}

p span {
  color: blue;
}

CSS single-line:

p { font-size: 18px; color: red; } p span { color: blue; }
TheScrappyDev
  • 4,375
  • 2
  • 21
  • 25

1 Answers1

1

You can use the style=compressed flag in the CLI to indicate that it should be output onto single line.

Normal usage:

$ sass style.scss

With style=compressed flag:

$ sass --style=compressed style.scss

https://sass-lang.com/documentation/cli/dart-sass#style

TheScrappyDev
  • 4,375
  • 2
  • 21
  • 25