Created
December 11, 2015 20:16
-
-
Save perplexes/e0e75f00b3772f2bf643 to your computer and use it in GitHub Desktop.
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
$ sassc test.scss | |
.fun-exists1 { | |
exists: false; | |
compact: true; } | |
.fun-exists2 { | |
exists: false; | |
compact: compact(true); } |
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
@if not function-exists(compact) { | |
@function compact($vars...) { | |
$list: (); | |
@each $var in $vars { | |
@if $var { | |
$list: append($list, $var, comma); | |
} | |
} | |
@return $list; | |
} | |
.fun-exists1 { | |
@if function-exists(compact) { | |
exists: true; | |
} | |
@else { | |
exists: false; | |
} | |
compact: compact(true); | |
} | |
} | |
.fun-exists2 { | |
@if function-exists(compact) { | |
exists: true; | |
} | |
@else { | |
exists: false; | |
} | |
compact: compact(true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment