csscomb.js
csscomb.js copied to clipboard
SASS functions shouldn't be ordered
When I run CSScomb in my file "_tools.scss" that contains the function
@function encodecolor($string) {
@if type-of($string) == 'color' {
$hex: str-slice(ie-hex-str($string), 4);
$string:unquote("#{$hex}");
}
$string: '%23' + $string;
@return $string;
}
the result is
@function encodecolor($string) {
$string: "%23" + $string;
@if type-of($string) == "color" {
$hex: str-slice(ie-hex-str($string), 4);
$string: unquote("#{$hex}");
}
@return $string;
}
Reordering the line $string: "%23" + $string; produces an error in the function. I can't find any way to avoid this from happening.