Skip to content

Instantly share code, notes, and snippets.

@dtothefp
Created May 27, 2014 03:58
Show Gist options
  • Save dtothefp/c3ec5a81c909a861af87 to your computer and use it in GitHub Desktop.
Save dtothefp/c3ec5a81c909a861af87 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
@mixin testing($properties) {
@if(type-of(nth($properties, 1)) == list) {
@each $property, $value in $properties {
#{$property}: $value;
}
} @else {
$property: nth($properties, 1);
$value: nth($properties, 2);
#{$property}: $value;
}
}
.sample-single {
$properties: background fire-brick;
@include testing($properties);
}
.sample-multiple {
$properties: opacity 1, background goldenrod, color grey;
@include testing($properties);
}
.sample-single {
background: fire-brick;
}
.sample-multiple {
opacity: 1;
background: goldenrod;
color: gray;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment