Created
July 18, 2014 15:56
-
-
Save acdlite/2c89fdc7fc879259c4e1 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.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); | |
} |
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
.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