Open zheeeng opened 8 years ago
This issue description is re-edited.
Yesterday, I met up this problem:
Original scss file demo:
@mixin color { $color: white; color: $color; }
After running CSScomb:
@mixin color { color: $color; $color: white; }
I found I cloud set '$variables' as the first order in config file. It solved my problem.
"sort-order": [ [ "$variable" ], ... ]
@function cal($paras) { $sum: 0; @each $para in $paras { $sum: $sum + $para; }; $sum: $sum * 2; @return $sum; }
@function cal($paras) { $sum: 0; $sum: $sum * 2; @each $para in $paras { $sum: $sum + $para; }; @return $sum; }
This change is unacceptable!
@function cal($parasets...) { $sum: 0; @each $paraset in $parasets { @each $para in $paraset { $sum: $sum + $para; } } @return $sum; } .test { height: cal(20px 20px, 30px 40px 10px); }
It works fine. But if I call the function by:
.test { height: cal((20px 20px), (30px 40px 10px)); }
Oops, CSScomb throw a error:
.../Application Support/Sublime Text 3/Packages/CSScomb/node_modules/csscomb/node_modules/csscomb-core/lib/core.js:412 throw e; ^
These bugs frustrated me the whole day. Should I also report these bugs to the repo of CSScomg.js? I haven't test these demos in cli.
I found a solution: set "$variable" as the first order of "sort-order":
"sort-order": [ [ "$variable" ], [ "$include" ], ... ]
CSScomb messed up my scss file! help!
This issue description is re-edited.
Yesterday, I met up this problem:
Original scss file demo:
After running CSScomb:
I found I cloud set '$variables' as the first order in config file. It solved my problem.
Very Big, serious, frustrated bugs Today I met.
Bug 1, collect all $variables togather:
Original scss file demo:
After running CSScomb:
This change is unacceptable!
Bug 2, incorrectly process nested list parameters:
Original scss file demo:
It works fine. But if I call the function by:
Oops, CSScomb throw a error:
These bugs frustrated me the whole day. Should I also report these bugs to the repo of CSScomg.js? I haven't test these demos in cli.