csscomb.js icon indicating copy to clipboard operation
csscomb.js copied to clipboard

Double newline between @import statements.

Open alexanderbaran opened this issue 7 years ago • 5 comments

I am using Visual Studio Code version 1.18.1 on Windows 7. In my sass files there is double newline between @import statements.

Before:


@import 'size';
@import 'color';
@import 'footer-vars';

After:

@import 'size';

@import 'color';

@import 'footer-vars';

What can I do in my config to only have one newline between them? It used to be one newline before, but something changed.

alexanderbaran avatar Nov 26 '17 01:11 alexanderbaran

This has happened to me too after turning on

    "lines-between-rulesets": 1,

nakhbari avatar Oct 11 '18 14:10 nakhbari

i'd imagine we'd need to add an isImportStatement check here https://github.com/csscomb/csscomb.js/blob/269e85400541d805e97d58d74d24a06a99947db2/src/options/lines-between-rulesets.js#L236 to fix this

nakhbari avatar Oct 11 '18 15:10 nakhbari

Thanks for digging into this @nakhbari!

Would you be up for creating a PR?

jdalton avatar Apr 23 '19 03:04 jdalton

This is partially fixed. I can patch the lines-between-rulesets option.

jdalton avatar May 07 '19 07:05 jdalton

Hi, any thoughts when this issue will be closed?

mfilar avatar Oct 22 '19 06:10 mfilar