Created
February 18, 2014 03:53
-
-
Save fredyang/9064380 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.0.rc.4) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@function combine($prefix, $list) { | |
$temp: ""; | |
$n: length($list); | |
@for $i from 1 through $n { | |
@if $i == $n { | |
$temp: $temp + $prefix + nth($list, $i) ; | |
} @else { | |
$temp: $temp + $prefix + nth($list, $i) + ","; | |
} | |
} | |
@return $temp; | |
} | |
@mixin log($comment, $value: null) { | |
@if $value == null { | |
/* debug: #{$comment} */ | |
} @else { | |
/* debug: #{$comment}:#{$value} */ | |
} | |
} | |
//@include combine("fred", a, b, c...) | |
@include log(combine("prefix_", a b c)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* debug: prefix_a,prefix_b,prefix_c */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment