Created
November 15, 2013 10:07
-
-
Save jackw/7482037 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.0.rc.1) | |
// Compass (v0.13.alpha.10) | |
// ---- | |
@mixin gimme-stuff($var1, $imagePaths...) { | |
@if length($imagePaths) < 2 { | |
&:before { | |
content: "You need to provide two or more vars for gimme-stuff to work"; | |
display:block; | |
} | |
} @else { | |
& { | |
background:url(nth($imagePaths, 1)) no-repeat, url(nth($imagePaths, 2)) no-repeat, url(nth($imagePaths, 3)) no-repeat; | |
} | |
} | |
} | |
.my-selector { | |
@include gimme-stuff(monkey, 'my-first-image.png', 'my-second-image.png', 'my-third-image.png'); | |
} |
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
.my-selector { | |
background: url("my-first-image.png") no-repeat, url("my-second-image.png") no-repeat, url("my-third-image.png") no-repeat; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment