matype / stylefmt

stylefmt is a tool that automatically formats stylesheets.
Other
2.1k stars 89 forks source link

stylefmt adds a newline at the beginning of the file before variable declarations in scss #87

Closed cbrwizard closed 8 years ago

cbrwizard commented 8 years ago

Hey, I found an issue with stylefmt default rules. It adds a newline at the beginning of the file when there is a variable declaration on the first line:

$border: 1px solid #fff;

.border {
  border: $border;
}

I run stylefmt example.scss and that file ^ gets transformed into:


// here there actually is a newline but github's markdown does not display it
$border: 1px solid #fff;

.border {
  border: $border;
}

In my opinion, it's not intended and a newline shouldn't be added in the beginning of the file.

cbrwizard commented 8 years ago

Thanks for fixing this, @morishitter!