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

sort-order overrides space-after-opening-brace

Open lkraav opened this issue 10 years ago • 4 comments

v3.0.4, since current dev crashes in too many spots

{
    "verbose": true,
    "sort-order": [ "$variable", "$include" ],
    "sort-order-fallback": "abc",
    "space-after-opening-brace": 1,
}

RESULT

style.less
-    .singular-post #content & { display: inline-block; color: @grey;
+    .singular-post #content & {color: @grey; display: inline-block;

EXPECTED RESULT

style.less
-    .singular-post #content & { display: inline-block; color: @grey;
+    .singular-post #content & { color: @grey; display: inline-block;

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

lkraav avatar Feb 15 '15 02:02 lkraav

My current workaround is running csscomb twice with different configurations

$ csscomb -c /etc/csscomb-sort.json *.less # super brief sort-only configuration, generates broken opening brace spacing
$ csscomb -c /etc/csscomb.json *.less # beautify everything, fix up opening brace spacing

This is not particularly ideal, since it would be nice to have a single exit code for tooling etc. But even so, csscomb and gonzales-pe are pure awesomess and incredibly valuable, regardless of having to run once or twice :100: :100: :100:

lkraav avatar Feb 15 '15 17:02 lkraav

Same problem here

urecio avatar Mar 11 '15 10:03 urecio

+1

brunowego avatar Jul 12 '15 19:07 brunowego

i fixed this locally. i can make a PR if there's interest.

srrvnn avatar Feb 16 '16 19:02 srrvnn