Skip to content

Instantly share code, notes, and snippets.

@mturjak
Created March 27, 2014 11:57
Show Gist options
  • Save mturjak/9805993 to your computer and use it in GitHub Desktop.
Save mturjak/9805993 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
$default: 1;
@mixin test($p: null) {
@if ($p != null) {
/* 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(false);
}
test1 {
/* Do something else if $p is not passed */
value: 1;
}
test2 {
/* Do something if $p is passed */
value: false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment