Skip to content

Instantly share code, notes, and snippets.

@acdlite
Created July 18, 2014 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acdlite/2c89fdc7fc879259c4e1 to your computer and use it in GitHub Desktop.
Save acdlite/2c89fdc7fc879259c4e1 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// Base.Sass (v1.3.3)
// ----
@import "compass";
@import "base.sass/*";
$anonymous-placeholders: ();
@mixin placeholder-wrapper($name, $args...) {
$times: map-get($anonymous-placeholders, ($name, $args)) or 0;
$anonymous-placeholders: map-merge($anonymous-placeholders, (($name, $args): $times + 1)) !global;
$index: index($anonymous-placeholders, (($name, $args) ($times + 1)));
@if $times == 0 {
@at-root %-#{$name}-#{$index} {
@content;
}
}
@extend %-#{$name}-#{$index};
}
@mixin test($a, $b) {
@include placeholder-wrapper(test, $a, $b) {
a: $a;
b: $b;
}
}
.foo {
@include test(1, 1);
}
.bar {
@include test(1, 2);
}
.baz {
@include test(1, 1);
}
.foo, .baz {
a: 1;
b: 1;
}
.bar {
a: 1;
b: 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment