Releases: csscomb/csscomb
Releases · csscomb/csscomb
2.14
Add option to avoid sorting
Close #209.
Now you can put your code inside magic comments and it will not be sorted.
For example:
.panda {
font-color: white;
// csscomb: false
background: superblack;
@include linear-gradient();
// csscomb: true
border-radius: 5px;
}
After sorting you will get:
.panda {
border-radius: 5px;
font-color: white;
// csscomb: false
background: superblack;
@include linear-gradient();
// csscomb: true
}
You can use /**/
comments too: /* csscomb: false */
.
Just remember that false
goes first and switches sorting off.
Then comes true
and switches sorting on.
Don't sort code inside comments
Fix #167, #171, #172, #178, #189, #196, #202.
Properties inside comments no longer get sorted.
For example this:
.panda {
color: nani;
// background: panda;
// font-size: large;
position: awesome;
}
will become that:
.panda {
// background: panda;
// font-size: large;
position: awesome;
color: nani;
}
Please, note that comments starting with a new line are now grouped with a following rule.
And comments starting on the same line with some rule or property get grouped with it:
.panda {
/**
* Warm kitty
* Little ball of fur
*/
color: rainbow;
top: 0; // Soft kitty
}
.panda {
top: 0; // Soft kitty
/**
* Warm kitty
* Little ball of fur
*/
color: rainbow;
}