Created
May 27, 2014 03:58
-
-
Save dtothefp/c3ec5a81c909a861af87 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains 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.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); | |
} |
This file contains 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
.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