.sass, 3.0.0: adding second delimiter newline
config:
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": false,
"element-case": "lower",
"eof-newline": true,
"leading-zero": true,
"quotes": "single",
"sort-order-fallback": "abc",
"space-before-colon": "",
"space-after-colon": " ",
"space-before-combinator": " ",
"space-after-combinator": " ",
"space-between-declarations": "",
"space-before-opening-brace": " ",
"space-after-opening-brace": "",
"space-after-selector-delimiter": " ",
"space-before-selector-delimiter": "",
"space-before-closing-brace": "",
"strip-spaces": true,
"tab-size": true,
"unitless-zero": true,
"vendor-prefix-align": true,
"verbose": true,
original sass:
=hello
border: 1px
body
+hello
color: white
font-family: red
after running comb:
=hello
border: 1px
body
font-family: red
color: white
+hello
after running comb second time:
=hello
border: 1px
body
font-family: red
color: white
+hello
it stays like this on more runs.
OT: why is the mixin sorted to the end of the attributes?
@filtercake Any luck with finding a solution for this second line issue?
@filtercake I can't speak to the extra whitespace, but in regards to the mixin being sorted to the end, you can set that in your sort-order with $include. I agree that putting it at the end of the property list is a poor default, but it's unlikely to be intentional.
see: https://github.com/csscomb/csscomb.js/blob/master/doc/options.md#sort-order-vs-preprocessors
+1 . It seems that it needs the curly brackets to give "context" and manage correctly the whitespace. Pretty annoying, because it seems to happen only for .sass syntax files. Anyone found a solution?
I'm actually running into this issue in SCSS files too. This is my configuration (I've snipped out the sort-order to keep the length down).
I have it configured this way to not mess with single-line rules (which I prefer to format like this, as it really cuts down on scrolling when reading a stylesheet: .selector { rule: value }).
Most of the insertions happen near lines that were moved up or down for property sorting, but the really weird thing is it also happens in areas where no actual changes were made. To me it just looks like empty lines are being randomly inserted throughout the file.
Using version 3.1.7.
{
"eof-newline": true,
"leading-zero": false,
"remove-empty-rulesets": true,
"space-after-colon": " ",
"space-after-combinator": " ",
"space-before-colon": "",
"space-before-combinator": " ",
"space-before-selector-delimiter": "",
"strip-spaces": true,
"unitless-zero": true,
"sort-order": [--snipped--]
}