csscomb / csscomb.js

CSS coding style formatter
http://csscomb.com/
MIT License
3.28k stars 459 forks source link

Issue with eof-newline #572

Open line47 opened 6 years ago

line47 commented 6 years ago

I'd expect the results of "eof-newline": true to put a newline after every https://github.com/csscomb/csscomb.js/blob/dev/doc/options.md#eof-newline

However that is not happening when I run CSS Comb on an entire file.

Here is my config:

{
    "exclude": [
        ".git/**",
        "node_modules/**",
        "bower_components/**"
    ],
    "always-semicolon": true,
    "block-indent": "  ",
    "color-case": "lower",
    "color-shorthand": true,
    "element-case": "lower",
    "include": true,
    "eof-newline": true,
    "leading-zero": false,
    "quotes": "single",
    "remove-empty-rulesets": true,
    "space-after-colon": " ",
    "space-after-combinator": " ",
    "space-after-opening-brace": "\n",
    "space-after-selector-delimiter": "\n",
    "space-around-operator": " ",
    "space-before-closing-brace": "\n",
    "space-before-colon": "",
    "space-before-combinator": " ",
    "space-before-opening-brace": " ",
    "space-before-selector-delimiter": "",
    "space-between-declarations": "\n",
    "strip-spaces": true,
    "tab-size": true,
    "unitless-zero": true,
    "vendor-prefix-align": true,
    "sort-order": [ "..." ],
    "sort-order-fallback": "abc"
  }

Here is my SCSS before running CSS Comb:

.label-success {
  background-color: $label-success-bg-color;
}
.label-danger {
  background-color: $label-danger-bg-color;
}
.label-warning {
  background-color: $label-warning-bg-color;
}

Here is my SCSS after running CSS Comb: (no change 😢 )

.label-success {
  background-color: $label-success-bg-color;
}
.label-danger {
  background-color: $label-danger-bg-color;
}
.label-warning {
  background-color: $label-warning-bg-color;
}

What am I missing here?

anton-dubrovin commented 6 years ago

Hello, we have the same issue with eof newline. I get css something like this:

.ksf-field-box .ksf-field-box__title {
    margin-bottom: 1.2em;

    font-weight: 500;
}.ksf-field-box .ksf-field-box__desc {
    color: #989CB3;
}.ksf-field-box .ksf-field-box__main {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;

    max-width: 840px;
    margin: -10px;
}
jdalton commented 5 years ago

Hi @line47, @kraftstudio

Are either of you on Windows?

line47 commented 5 years ago

Hey @jdalton not I. I'm on Mac.