Skip to content

Instantly share code, notes, and snippets.

@stowball
Created January 30, 2014 08:44
Show Gist options
  • Select an option

  • Save stowball/8704754 to your computer and use it in GitHub Desktop.

Select an option

Save stowball/8704754 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.2.14)
// Compass (v0.12.2)
// ----
@mixin colors-with-prefix($names...) {
@for $i from 0 to length($names) {
.color-#{nth($names, $i + 1)} {
foo: bar;
}
}
}
@mixin colors-without-prefix($names...) {
@for $i from 0 to length($names) {
.#{nth($names, $i + 1)} {
foo: bar;
}
}
}
@include colors-with-prefix(black, white, almond);
//@include colors-without-prefix(black, white, almond);
.color-#000{foo:bar}.color-#fff{foo:bar}.color-almond{foo:bar}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment