Created
March 27, 2014 11:08
-
-
Save mturjak/9805178 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.2.17) | |
// Compass (v0.12.4) | |
// ---- | |
$default: 1; | |
@mixin test($p: null) { | |
@if ($p) { | |
/* Do something if $p is passed */ | |
value: $p; | |
} @else { | |
$p: $default; | |
/* Do something else if $p is not passed */ | |
value: $p; | |
} | |
} | |
test1 { | |
@include test(); | |
} | |
test2 { | |
@include test(1); | |
} |
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
test1 { | |
/* Do something else if $p is not passed */ | |
value: 1; | |
} | |
test2 { | |
/* Do something if $p is passed */ | |
value: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment