csscomb / csscomb.js

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

Issue with sass rules, like @import ecc.. #627

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi everyone!

I have this scss

.magic-class { display:block; grid-template-columns: 1rem 1rem 1rem; @include box(2rem); @include transition(); @include box; overflow:hidden; touch-action: none; }

And when I run css comb it will be like

.magic-class { @include box(2rem);

@include transition();

@include box; touch-action: none; display: block; overflow: hidden; grid-template-columns: 1rem 1rem 1rem; }

How can I prevent to add this extra lines after every @import rule?

Help me pls, thank you

ghost commented 4 years ago

Anyone?

henriquebs12 commented 4 years ago

Same question here. Plus, is there a way to indent those @import/@include etc? CSSComb is removing the indentation.

SahilMepani commented 4 years ago

I've the same issue. Anyone else help

dnwhte commented 4 years ago

Changing the EOL sequence to LF seems to fix it for me.

ghost commented 4 years ago

@dnwhte How do you have do It? I would to try your suggestion, and see by myself if It work

pastuh commented 4 years ago

Looks like a lot of bugs exist.. So i skip for now :X

ghost commented 4 years ago

I suggest for all to use another tool for sort scss properties, csscomb is no longer maintained and it has some bugs. In particular: Postcss tool: https://github.com/Siilwyn/css-declaration-sorter/ Postcss tool: https://github.com/hudochenkov/postcss-sorting/